Combining first-principles calculations and experimental studies, the influences of doping with transition metals Ti and Ni on the dehydrogenation thermodynamics of magnesium hydride (MgH2) were investigated, and the doping mechanism was discussed. The results show that the incorporation of either Ti or Ni decreases the hydrogen desorption enthalpy and initial dehydrogenation temperature of MgH2. By contrast, the doping effect of Ni is more notable. The local lattice distortion of MgH2 induced by dopants is considered to be the main reason for the improved dehydrogenation thermodynamics. Analy...