A powerful yet safe primary explosive, embedded in a conductive carbon scaffold, is prepared by using a metal-organic framework as precursor. It simultaneously possesses low electrostatic sensitivity, good flame sensitivity, and excellent initiation ability. This method is simple, scalable, and provides a new platform for the development of energetic materials especially those employed in miniaturized explosive systems.