An electroless ternary Ni–Sn–P transition layer with high corrosion resistance was applied for acid electroless nickel plating on magnesium alloys. The surface morphologies and microstructure of the traditional alkaline electroless Ni–P and novel Ni–Sn–P transition layers were compared by SEM and XRD, and the bonding strengths between the transition layers and AZ31 magnesium alloys were tested. The corrosion resistance of the samples was analyzed by porosity test, potentiodynamic polarization, electrochemical impedance spectroscopy (EIS) in acid electroless solution at pH 4.5 and immersion test in 10% HCl. The results indicate that the transition layer is essential for acid electroless plating Ni–P coatings on magnesium alloys. Under the same thin thickness (~6 μm), the electroless Ni–Sn–P transition layer possesses superior properties to the traditional Ni–P transition layer, including high amorphization, smooth and dense surface without pores, enhanced bonding strength and corrosion resistance. Most importantly, acid electroless Ni–P coatings can be successfully deposited on magnesium alloys by using Ni–Sn–P transition layer.