The invention discloses a preparation method of copper azide/cuprous azide packaged by a conductive metal organic framework. According to the method, a conductive copper-containing metal organic framework material is adopted as a precursor, and azido of the precursor is completed through a liquid-solid electrochemical azido reaction. According to the invention, the copper azide/cuprous azide nanocrystals are highly and uniformly embedded in the conductive frame, so that agglomeration of copper azide/cuprous azide can be effectively avoided, static electricity generated by friction, displacement and the like can be reduced, the conductive frame can promote effective transfer of charges, accumulation of static charges is avoided, and the static safety performance is improved. Besides, the liquid-solid electrochemical azide reaction has the advantages of safety, high efficiency, short reaction time, high operability and the like, and the preparation process is compatible with the MEMS process, so that the application of the copper azide/cuprous azide material in micro devices is facilitated.