The influences of the addition of Ag on the glass forming ability (GFA) and corrosion behavior were investigated in the Mg-Ni-based alloy system by X-ray diffraction (XRD) and electrochemical polarization in 0.1 mol/L NaOH solution. Results shows that the GFA of the Mg-Ni-based BMGs can be improved dramatically by the addition of an appropriate amount of Ag; and the addition element Ag can improve the corrosion resistance of Mg-Ni-based bulk metallic glass. The large difference in atomic size and large negative mixing enthalpy in alloy system can contribute to the high GFA. The addition element Ag improves the forming speed and the stability of the passive film, which is helpful to decrease the passivation current density and to improve the corrosion resistance of Mg-Ni-based bulk metallic glass