Series of diaryl-based pyrazole and triazole derivatives were designed and synthesized in a facile synthetic approach in order to produce selective COX-2 inhibitor. These series of derivatives were synthesized by different reactions like Vilsmeier–Haack reaction and click reaction. In vitro COX-1 and COX-2 inhibition studies showed that five compounds were potent and selective inhibitors of the COX-2 isozyme with IC50 values in 0.551–0.002 μM range. In the diarylpyrazole derivatives, compound 4b showed the best inhibitory activity against COX-2 with IC50 = 0.017 μM as one of the N-aromatic rings was substituted with sulfonamide and the other aromatic ring was unsubstituted. However, when the N-aromatic ring was substituted with sulfonamide and the other aromatic ring was substituted with sulfone (compound 4d), best COX-2 selectivity was achieved (IC50 = 0.098 μM, SI = 54.847). In the diaryltriazole derivatives, compound 15a showed the best inhibitory activity in comparison to all synthesized compounds including the reference celecoxib with IC50 = 0.002 μM and SI = 162.5 as it could better fit the extra hydrophobic pocket which is present in the COX-2 enzyme. Moreover, the docking study supports the obtained SAR data and binding similarities and differences on both isozymes.