Energetic materials (EMs) are a group of special energy materials, and it is generally full of safety risks and generally costs much to create new EMs. Thus, machine learning (ML)-aided discovery becomes highly desired for EMs, as ML is good at risk and cost reduction. This work decodes hexanitrobenzene (HNB) and 1,3,5-triamino-2,4,6-trinitrobenzene (TATB) as two distinctive energetic nitrobenzene compounds by ML, in combination with theoretical calculations. Based on a series of highly accurate models of density, heat of formation, bond dissociation energy and molecular flatness, the ML predictions show that HNB is the most energetic among ∼370 000 000 single benzene ring-containing compounds, while TATB possesses a moderate energy content and very high safety, as determined experimentally. This work exhibits the significant power of ML and presents an instructive procedure for using it in the field of EMs. The ML-aided design and highly efficient synthesis and fabrication combined strategy is expected to accelerate the discovery of new EMs.