In this work, to attempt discovery of novel xanthine oxidase (XO) inhibitors, we developed a method for optimizing the Nigella sativa oil extraction by considering the seed size particles, the liquid seed ratio, the duration of the extraction procedure and the temperature of extraction. On the other hand, new pyrimidine and triazolopyrimidine derivatives were prepared in an attempt to mimic the pyrazolpyrimidine structure of allopurinol (a well-known xanthine oxidase inhibitor drug). Most of the developed compounds were shown to have strong xanthine oxidase inhibitory activities, while Nigella sative extract and compound 6b ranked as the most effective inhibitors (IC50=1.87 and 0.63μg/ml, respectively, versus Allupurinol's IC50=0.62μg/ml). Nigella sative extract and compound 6b showed potent activity (IC50=0.60μg/ml). In addition, compound 6b was formulated as effervescent granules and exhibited good flow-ability properties. To further understand the approach of binding between synthesized compounds 6a-c and xanthine oxidase, a molecular docking investigation was conducted. These findings highlight the discovery of a novel group of xanthine oxidase inhibitors with the potential to improve the state-of-the-art treatment for gout.