Abstract Electroless Ni−P coatings on magnesium alloy specimens were heat-treated in vacuum and air atmospheres at 200 °C, 250 °C, and 300 °C. The results showed that the coating grains evolved into fine nodular structures following heat treatment at 200 °C and above. Nodule sizes ranged from 0.40 μm to 2.4 μm, with higher heat treatment temperatures significantly raising the proportion of larger nodules (nodule length: L ≥ 1 μm). Under identical heat treatment conditions, the average nodule size was smaller in vacuum compared to air. With increasing heat treatment temperature, the coating gradually transformed from microcrystalline to a crystalline structure, with vacuum heat treatment yielding a higher degree of crystallization than treatment in air. Meanwhile, a distinct Ni 3 P phase was observed in the coating after vacuum heat treatment at 300 °C. For vacuum heat treatment at 200 °C and above, as well as air heat treatment at 200 °C, nickel and phosphorus on the coating surface mainly existed in their elemental forms, with minor amounts of Ni(OH) 2 and phosphate compounds present. Following air heat treatment at 250 °C and above, nickel and phosphorus on the surface were completely oxidized. Heat treatment increased the φ corr of the coating from approximately −0.45 V to above −0.3 V, while the J corr decreased by an order of magnitude. Furthermore, the coating hardness increased from 406 HV to 529.1 HV and 499.2 HV after vacuum and air heat treatments at 300 °C, respectively. Air heat treatment caused agglomeration of the tin solder on the coating surface, resulting in reduced weldability compared to vacuum treatment. Vacuum heat treatment promoted coating crystallization, leading to a notable increase in hardness. Additionally, the absence of surface oxidation under vacuum conditions enhanced welding performance.