Polynitro compounds exhibit high density and good oxygen balance, which are desirable for energetic material applications, but their syntheses are often very challenging. Now, the design and syntheses of a new three-dimensional (3D) energetic metal-organic framework (EMOF) and high-energy-density materials (HEDMs) with good thermal stabilities and detonation properties based on a polynitro pyrazole are reported. Dipotassium 3,5-bis(dinitromethyl)-4-nitro-1H-pyrazole (5) exhibits a 3D EMOF structure with good thermal stability (202 °C), a high density of 2.15 g cm-3 at 100 K (2.10 g cm-3 at 298 K) in combination with superior detonation performance (Dv = 7965 m s-1, P = 29.3 GPa). Dihydrazinium 3,5-bis(dinitromethyl)-4-nitro-1H-pyrazole (7) exhibits a good density of 1.88 g cm-3 at 100 K (1.83 g cm-3 at 298 K) and superior thermal stability (218 °C), owing to the presence of 3D hydrogen-bonding networks. Its detonation velocity (8931 m s-1) and detonation pressure (35.9 GPa) are considerably superior to those of 1,3,5-trinitro-1,3,5-triazine (RDX). The results highlight the syntheses of a 3D EMOF (5) and HEDM (7) with five nitro groups as potential energetic materials.