Searching for effective and selective anti-inflammatory agents, our study involved designing and synthesizing new pyrazole and pyrazolo[1,5-a]pyrimidine derivatives 4-11. The structures of the synthesized derivatives were confirmed using different spectroscopic techniques. Virtual screening was achieved for the newly designed derivatives using in silico docking simulation inside the active sites of four proteins classified as two cyclooxygenases (COX)-1 (PDB: 3KK6 and 4OIZ) and two COX-2 (PBD: 1CX2 and 3LN1). Among them, six derivatives 4c, 5b, 6a, 7a, 7b, and 10b displayed the highest binding energy. These derivatives were evaluated for their in vitro COX-1 and COX-2 inhibitory activities and their selectivity indexes were calculated. Additionally, these derivatives displayed IC 50 values ranging between 4.909 ± 0.25 and 57.53 ± 2.91 µM, and 3.289 ± 0.14 and 124 ± 5.32 µM, against COX-1 and COX-2, respectively. Furthermore, the tested derivatives were found to have selective inhibitory activity on the COX-2 enzyme. Surprisingly, the two pyrazole derivatives 4c and 5b were found to be the most active, with IC 50 values of 9.835 ± 0.50 and 4.909 ± 0.25 µM and 4.597 ± 0.20 and 3.289 ± 0.14 µM compared with meloxicam (1.879 ± 0.1 and 5.409 ± 0.23 µM) and celecoxib (5.439 ± 0.28 and 2.164 ± 0.09 µM) against COX-1/-2, respectively. Besides, two pyrazole derivatives, 4c and 5b, displayed a COX-1/COX-2 SI of 2.14 and 1.49. Computational techniques such as molecular docking, density function theory (DFT) calculation, and chemical absorption, distribution, metabolism, excretion, and toxicity evaluation were applied to explain the molecules' binding mode, chemical nature, drug likeness, and toxicity prediction.