Mg2−x Al x Ni thin films (x =0, 0.1, 0.2, 0.3) are prepared by magnetron sputtering. Their charge–discharge properties are tested, and the effects of Al partial substitution for Mg on the change of the enthalpy of hydrides formation and electrochemical properties are discussed. The charge–discharge experiments show that the discharge properties of the Mg2Ni film are improved by the substitution of Al for Mg. The change of the enthalpy of hydrides formation of the Mg2−x Al x Ni film decrease with the increase of Al content, which indicate that the stability of the Mg2−x Al x Ni film hydrides decrease with the increase of Al content. The potentiodynamic polarization results show that the anti-corrosion property of Mg2Ni thin film is improved with the partial substitution of Al for Mg. Electrochemical impedance spectra studies suggest that the oxide layer thickness decrease with Al substitution, and the charge-transfer resistance of the film electrode increase from 202Ω (Mg2Ni) to 1474Ω (Mg1.6Al0.4Ni) which indicates that the reaction rate at the electrode surface decrease.