Two novel nitrogen-rich heterocyclic energetic compounds, 5-amino-3-azido-4-nitro-1H-pyrazole (3) and 5,5′-diazido-4,4′-dinitro-1H,1′H-2,2′-biimidazole(6), featuring ortho azido/nitro groups were designed and synthesized by reactions of diazonium salts with sodium azide. In addition, treatment of diazonium salts with a mixture of hydrazine monohydrate and sodium nitrite in acetic acid also gave the same products 3 and 6 in high yields. Both structures of the products were characterized by 1H NMR, 13C NMR, IR and elemental analysis, as well as single-crystal X-ray diffraction. Furthermore, their physicochemical and energetic properties were studied.