The effect of Mg 2+ in the phosphate solution on the microstructural evolution and corrosion resistance of the coating on hot-dip galvanized steel has been explored. Surface morphology observations reveal that increasing the solution Mg 2+ concentration increases the population density and refines the grain size of the phosphate grains. In the presence of Mg 2+ , the phosphate coating is composed of mixed Zn phosphate hydrate and (Zn, Mg) phosphate hydrate. Furthermore, elevating Mg 2+ in the solution reduces the porosity of the phosphate coating. As a result, the corrosion resistance of the phosphate coating is improved.