Two nitrogen-rich energetic compounds with -stacking, 1,1-dichloro-2,2,3,3,6,6-hexanitro-5,5-dihydroxyazobenzene (1) and 8-(2,4,6-triazido-3,5-dinitrophenyl)-8H-[1,2,3]triazolo[4,5:5,6]benzo[1,2-c:3,4-c]bis([1,2,5]oxadiazole) 1,4-dioxide (2), were prepared by a novel synthesis method, and their structures were determined by single-crystal X-ray diffraction analysis. The decomposition temperature of 1 is 336 degrees C and 2 exhibits excellent heat of formation of 1160.5 kJ mol(-1) (2.21 kJ g(-1)). The condensation reaction of the coupling of a N?N bond and an azido from 1 to 2 was proved to be an efficient method to synthesize benzotriazole. This synthetic strategy for benzotriazole may arouse considerable interest in the area of organic synthesis.