Solid nitrogen-rich compounds are potential high-energy-density materials (HEDMs). The enormous challenge in this area is to synthesize and stabilize these energetic materials at moderate pressure and better under near-ambient conditions. Here, we perform an extensive theoretical study on hydronitrogens by the reverse design method considering both energies and energy densities. Four hydronitrogens with different stoichiometries, that is, N4H, N3H, N2H, and NH, are found to be stable at pressures of about 80-300 GPa and metastable with pressure releasing to ambient pressure. The energy densities of these hydronitrogens are about 5.6-6.5 kJ/g and 1.3-1.5 times larger than that of trinitrotoluene (TNT). Most importantly, the Pbam phase of the N4H compound is an excellent high-temperature superconductor with a Tc of 37.7 K at 72 GPa. The present findings enrich new phases of hydronitrogens under high pressure and characterize their structural and energetic properties and superconductivity, which offer crucial insights for further design and synthesis of exceptional materials with high energy density and high-temperature superconductivity.