The structural changes in MgH2 induced by contact with fluorite transition metal hydrides (TMH2, TM=Sc, Ti, V, Cr, Y, Zr, Nb, La, Hf) have been studied using density-functional theory calculations. Models of MgH2(rutile)/TiH2(fluorite) and MgH2(fluorite)/TiH2(fluorite) multilayers with different Mg:TM ratios have been designed. With a fixed thickness of the TMH2 layer, structure transformation of MgH2 from rutile to fluorite occurs with a decrease in thickness of the MgH2 layer. The hydrogen desorption energy from the fluorite MgH2 layer in the multilayers is significantly lower than that of the bulk rutile MgH2. The structural deformation of the MgH2 layer due to the strain induced by TMH2 is found to be responsible for the destabilization of the Mg-H bond: the more structural deformation, the more destabilization of the Mg-H. Our results provide an important insight for the development of new hydrogen-storage materials with desirable thermodynamic properties.