Mg in Mg2Ni-type alloy was partially substituted with Y to improve the electrochemical performance of the alloy. The as-cast Mg2Ni-type Mg20−xYxNi10 (x = 0, 1, 2, 3, 4) electrode alloys were prepared by vacuum induction melting under the protection of high-purity helium atmosphere and subsequent mechanical milling for different time points. Effects of Y substitution with Mg on the microstructures and electrochemical performance of the as-cast and milled alloys were investigated in detail by X-ray diffraction, transmission electron microscopy, scanning electron microscopy coupled with energy-dispersive spectrometry, and automatic galvanostatic system. Results revealed that the substitution of Y with Mg evidently changed the phase composition of alloys. At a Y content of x ≤ 1, the major phase in alloys was Mg2Ni, but the phase changed to YMgNi4 + YMg3 with further addition of Y content. Electrochemical measurement showed that variations in the discharge capacity of alloys with Y content were closely related to the milling time. At ≤ 10-h milling time, the discharge capacity of alloy invariably increased with the increasing Y content; at > 10-h milling time, the discharge capacity initially increased, and then decreased with the increasing Y content. The substitution of Y with Mg dramatically ameliorated the cycle stability of the as-cast and milled alloys. Furthermore, high rate of discharge ability, electrochemical impedance spectrum, Tafel polarization curves, and potential-step measurements indicated that the electrochemical kinetic properties of the as-cast and milled alloys initially increased and then decreased with the increasing Y content.