The applications of magnesium alloys are limited because of their poor corrosion properties. In this study, the corrosion behaviours of Mg-3.4Y-3.6Sm-2.6Zn-0.8Zr alloy in 3.5 wt-% NaCl solution were investigated, the results suggested that the precipitations of rare-earth phase, (Mg, Zn) 3 (Y, Sm) and Mg 12 (Y, Sm) Zn, are beneficial to enhance the anti-corrosion of magnesium alloys. The network second phase, (Mg, Zn) 3 (Y, Sm), may act as an anode. It can form a galvanic couple with the adjacent α-Mg matrix and effectively protect the α-Mg matrix. The existence of the Mg 12 (Y, Sm) Zn phase makes the distribution of the (Mg, Zn) 3 (Y, Sm) phase more uniform, which may produce a more uniform electrochemical structure and reduce the galvanic corrosion. Under the dual action of the two second phases, the corrosion performance of Mg-3.4Y-3.6Sm-2.6Zn-0.8Zr alloy was better than that of the standard AZ31B alloy. The corrosion mechanism of the alloy is galvanic corrosion due to the second phase with low potential.