MgH2 and Mg(BH4)2 powders were mixed with AN, TNT, RDX and a desensitized RDX(D‐RDX) in this work. The impact and friction sensitivities of the mixtures were measured by a drop hammer machine and a pendulum type friction machine. The result shows that MgH2 powder significantly increases the mechanical sensitivity of all the explosive compounds. The H50 of RDX/MgH2 mixture could be as low as 7.8 cm with a 2 kg weight hammer. D‐RDX/MgH2 mixture is even more sensitive to mechanical stimulates than pure RDX. By contrast, Mg(BH4)2 has a less influence on the mechanical sensitivity of the compounds. But still, it is not beneficial to the safety of the explosives. Vacuum stability tests were conducted to study the compatibility between MgH2/Mg(BH4)2 powders and the explosives. The result shows that MgH2 releases more gas product and has a higher reactivity with the compounds than Mg(BH4)2 at a temperature of 100 °C. The free hydrogen existed on the surface of MgH2 crystal lattice has been considered as a potential reason of high gas production at low temperature which could increase the number of hot spots. The hardness of MgH2 particles has also been thought to be the major reason of high mechanical sensitivity for the mixtures.