Benzoxazine and quinazoline are nitrogen-containing heterocyclic scaffolds found in various biologically active compounds. Due to their diverse biological actions, these heterocyclic rings serve as crucial frameworks for designing medicinal compounds. This study aimed to synthesize and assess in vivo anti-inflammatory, analgesic, and low ulcerogenic potential of a few novel benz[d][1,3]-oxazin-4-one and quinazolinone derivatives. Benzoxazinones (3a-e) were synthesized by cyclizing the carboxylic group (-COOH) of five nonsteroidal anti-inflammatory drugs viz., aceclofenac, ibuprofen, diclofenac, mefenamic acid and ketoprofen (2a-e) with anthranilic acid (1) using dry phosphorus oxychloride (POCl3) in pyridine. The corresponding quinazolinone derivatives (5a-e) were obtained by reacting 3a-e with isonicotinic acid hydrazide (4). Both sets of compounds were evaluated for their anti-inflammatory, analgesic effects, and ulcerogenicity in animal models. Structural characterization was performed using spectral analysis. Among the benzoxazinone derivatives, compound 2-(2-((2,6-dichlorophenyl) amino) benzyl)-4H-benzo[d][1,3]oxazin-4-one (3d) exhibited significant anti-inflammatory activity (62.61% inhibition of rat paw edema) and analgesic activity (62.36% protection in acetic acid-induced writhings) with tolerable gastrointestinal toxicity (2.67 ulcerogenicity index) compared to quinazolinone derivatives. The results of anti-inflammatory and analgesic activities of both the series are comparable with the respective, positive control. Compound 3d, a benzoxazinone-diclofenac hybrid, emerged as a lead molecule with potent anti-inflammatory, analgesic activities and moderate gastric toxicity showcasing the promising potential for further development.