In order to compete with Li-ion batteries, the discharge capacity and cycling life of nickel metal hydride batteries need to be further improved. However, this is rather difficult due to poor performances of the negative electrode materials—hydrogen storage alloys. In this work, a new strategy is proposed for designing hydrogen storage alloys with high capacity and long cycling life through theoretical analysis and density functional theory simulation, which points out that it is crucial to substitute Ni atoms inside the alloy with Mg by the precise control of stoichiometric ratio and Mg content. The candidate alloy La0.62Mg0.08Ce0.2Y0.1Ni3.25Co0.75Mn0.2Al0.3 [corresponding to (LaCeYMg) (NiCoMnAl)4.5] exhibits a high capacity of 326.7 mAh g−1 and a capacity retention of 80% after a long cycling life of 928 cycles, showing great potential for applications in nickel metal hydride batteries. The design strategy also provides new insights into the development of new-type high-performance hydrogen storage alloys.