Zn-Al-Mg is one of the most important coating types in hot dipped galvanization. This surface coating also provides surface barrier protection and galvanic protection, which improves the esthetics and service life of the material. In this paper, the corrosion resistance of Zn-11Al-XMg coatings with Mg content (wt. %) of 0, 1, 2, 3 was studied, and the effect of Mg content on the corrosion resistance of Zn-11Al-XMg coatings was analyzed. The results show that Zn-11Al coating is composed of an eutectoid Al-rich phase and a Zn-rich phase. When the Mg content is less than 2 wt. %, the increase of Mg content is accompanied by the decrease of the Al-rich and Zn-rich phases and the increase of the ternary eutectic content. When the Mg content is more than 2 wt. %, the increase of Mg content is accompanied by the decrease of the ternary eutectic content and the increase of the primary MgZn2 phase content. The results of corrosion experiments show that the Zn-11Al-XMg coating is mainly composed of an Al-rich phase and an Mg2Zn11 phase in ternary eutectic as the main anode. The coating after adding Mg forms a denser corrosion product film, among which the Zn-11Al-2Mg coating close to the eutectic point has the best corrosion resistance.