B3LYP/aug-cc-pvDZ level of theory is applied to study the geometric structures, electronic topologies, heats of formation, hyperconjugations and steric repulsions of 27 kinds of compounds obtained by successive replacement of CH groups with nitrogen atoms in cyclobutadiene, cyclopentadiene and benzene. The results reveal that the total energy linearly decreases along with the replacement of CH groups by nitrogen atoms for the three systems. To estimate the potential of high nitrogen content high energy materials (HNC–HEMs), heats of formation are calculated by G3 method. With the increase of the number of nitrogen atoms in ring, heats of formation increase substantially. The four-membered ring system is found to have the greatest heat of formations, followed by the six-membered ring system, and then by the five-membered ring system. Especially, hexazine and tetraazacyclobutadiene have great heats of formation relative to the other compounds, which implies that they should be applicable as HNC–HEMs. In addition, our studies indicate that the relationship between the total energy or heats of formation of isomers and the position of nitrogen atoms is (ortho) meta<(ortho) para<ortho. NBO analysis shows that it is hyperconjugation, not steric repulsion that plays a key role in the relative stability of isomers.