Four novel series of 1-substituted-3-(2-methyl-4-oxo-4H-quinazolin-3-yl) urea and/or thiourea IIIa–c, 4-substituted-N-(2-methyl-4-oxo-4H-quinazolin-3-yl) benzene sulfonamide VIa–c and their NO-hybrid molecules as nitrate esters Va–c and VIIIa–c have been synthesized and evaluated for their anti-inflammatory activity in vivo and in vitro. Moreover, the nitrate ester derivatives Va–c, VIIIa–c have been assayed for the release of nitric oxide in serum using the Griess diazotization method by a nitric oxide detection kit, and the results were correlated with their gastric protective activity through the determination of the ulcer index, and histopathological investigations of the gastric mucosa under a light microscope. All of the tested compounds showed potent to moderate anti-inflammatory activity when compared to the reference drug Meloxicam. In the comparison of IIIb and its nitrate ester Vb, for the COX-2 inhibition assay, IIIb showed IC50 = 5 μM, and Vb showed IC50 = 6.86 μM with a selectivity index of 4.74 and 5.03, respectively. As for the IC50 of the COX-1 assay, it was found that the structures carrying nitric oxide moieties had less affinity to inhibit COX-1 than their corresponding starting intermediates, as in the case of compound IIIb that showed IC50 = 23.76 μM, and its nitrate ester Vb that showed IC50 = 34.6 μM; hence, it can be concluded that the alcoholic metabolites of NO esters had less tendency to inhibit COX-1, leading to less gastric ulcerative side effects. This was confirmed by measuring the nitric oxide amount release from Vb, which was found to be 28.53 μmol L−1 with the lowest ulcer index of 0.4, showing the least tendency to induce stomach ulcerations in rats. According to these results, we can conclude that quinazoline derivatives with nitric oxide release moiety seem potentially attractive as preferential COX-2 inhibitors.