Interface is crucial to enable desirable service performances of coatings on substrates. In this paper, Ni-P coatings were prepared on AZ31B alloy by using electroless plating, with the coating/substrate interface being tuned to improve the corrosion resistance. The interface tuning involved a phosphate treatment prior to the electroless plating, which created a uniform surface of the Mg substrate and finally led to Ni-P plating coatings with enhanced density during the electroless plating. Electrochemical testing was performed to compare the corrosion properties between the Ni-P coatings with and without phosphate treatment. The experimental results evidently showed that the introduction of phosphate treatment, especially after an annealing treatment, greatly improved the corrosion resistance. The underlying mechanisms, revealed by microstructural examinations, were that the phosphate treatment reduced the substrate surface roughness and likely promoted a high and uniform nucleation intensity of the Ni-P coating. Corrosion processes of the unannealed and annealed Ni-P coatings with an interfacial phosphate layer were further clarified for comparison.