2-Hydrazinyl-N-(4-sulfamoylphenyl)acetamide 3 was the key intermediate for the synthesis of novel hydrazones 4–10 and pyrazole derivatives 11–17. All compounds were tested for their in vivo anti-inflammatory activity and their ability to inhibit the production of PGE2 in serum samples of rats. IC50 values for the most active compounds for inhibition of COX-1 and COX-2 enzymes were determined in vitro, and they were also tested for their ulcerogenic effect. Molecular docking was performed on the active site of COX-2 to predict their mode of binding to the amino acids. Most of the synthesized compounds showed good anti-inflammatory activity especially compounds 3, 4, 8, 9, 15, and 17 which showed better activity than diclofenac as the reference drug. Compounds 3, 8, 9, 13, and 15–17 were less ulcerogenic than indomethacine as the reference drug. Most of the synthesized compounds interacted with Tyr 385 and Ser 530 in molecular docking study with additional hydrogen bond for compound 17. Compound 17 showed good selectivity index value of 11.1 for COX-1/COX-2 inhibition in vitro.