This book describes the application of 1,5-electrocyclization and Dimroth rearrangement strategy in the synthesis of novel heterocyclic compounds. The ring systems prepared include pyrazolo[4,3-e][1,2,4]triazolo[4,3-c]pyrimidine and pyrazolo[4,3-e][1,2,4]triazolo-[1,5-c]pyrimidine derivatives which are expected to have promising biological activity, For example, several 3- and/or 5-substituted 7H-pyrazolo[4,3-e][1,2,4]triazolo[4,3-c]pyrimidines and pyrazolo[4,3-e][1,2,4]triazolo-[1,5-c]pyrimidine were reported to be potent xanthine oxidase (XO) inhibitors that behave as selective antagonists for human A2A and A3 adenosine receptor subtypes. In addition, various of the mentioned derivatives have been used as the new pharmacological tool for characterization of human A3 adenosine receptors. Also a novel series of 1,2,4-triazolo[4,3-a]quinazolin-5(4H)-one and 1,4-disubstituted-1,2,4-triazolo[1,5-a]quinazolin-5(4H)-one derivatives were prepared using the same methodology of 1,5-electrocyclization and Dimroth rearrangement.