A first-principles plane-wave pseudopotential method based on the density functional theory was used to investigate the energy and electronic structure of magnesium hydride(MgH_2) alloyed by X(X=Si,Ge,Sn,Pb).Through calculations of the negative heat of formation of magnesium hydride alloyed by X,it was found that when a little X dissolve into magnesium hydride,the structural stability of alloying systems decreases,which indicates that the dehydrogenation properties of MgH_2 can be improved.After comparing the densities of states(DOS) and the charge distribution of MgH_2 with and without X alloying,it was found that the improvement of the dehydrogenation properties of MgH_2 alloyed by X attributes to the fact that the weakened bonding between magnesium and hydrogen is caused by no stronger interactions between X and hydrogen.The calculation results of the improvement of the dehydrogenation properties of MgH_2-X(X=Ge) systems are in agreement with the experimental results.Hence,the dehydrogenation properties of MgH_2 are expected to be improved by the addition of Si,Sn,Pb alloying elements.