Developing heat-resistant explosives with excellent comprehensive performance is currently a significant challenge. Herein, a series of new heat-resistant energetic compounds based on pyrazole and triazole were designed and synthesized. Their structures were characterized by nuclear magnetic resonance (NMR), Fourier transform infrared spectroscopy (FT-IR), elemental analysis (EA), and mass spectrometry (MS), and the four ion salts were also confirmed by single-crystal X-ray diffraction. In light of the crystal data, theoretical calculations including the Hirshfeld surfaces, the two-dimensional (2D) fingerprint, and the interaction region indicator were used to explain the relationship between their structure, stability, and safety by studying intermolecular hydrogen bonding and stacking methods. Their thermal behavior and detonation performance have also been systematically studied. NBDAT and its salts exhibit density ranging from 1.772 to 1.901 g cm −3 and detonation velocity and detonation pressure between 8234 and 8812 m s −1 and 27.0 and 31.4 GPa, respectively. Among them, the neutral NBDAT has an excellent comprehensive performance with a density of 1.851 g cm −3 , a decomposition temperature of 354.5 °C, superior detonation performances of D = 8812 m s −1 , P = 30.5 GPa, and low sensitivity of IS = 40 J, FS = 360 N, making it a promising candidate to replace 1,3,5-triamino-2,4,6-trinitrobenzene (TATB) and hexanitrostilbene (HNS) as heat-resistant explosives.