In the present study, the corrosion behavior of an as-cast magnesium alloy was studies focusing on the galvanic corrosion between a precipitate and Mg-rich matrix. Through immersion and electrochemical tests, the variation of the corrosion behavior with the alloy composition and alloy system was discussed in detail. The corrosion rate of an as-cast alloy increased abruptly to 9 wt.% Al in both alloys, but in the composition range of over 12 wt.% Al, the corrosion rate reveals a different tendency than the alloy system. The β-phase that is a typical precipitate in an Mg-xAl alloy is a more potent cathodic phase than is the ternary precipitate in a Mg-xAl-LZn alloy. In the case of the Mg-xAl alloy, the formation of a galvanic cell between the precipitate and matrix promotes the preferred dissolution of the matrix, but the precipitate in the Mg-xAl-lZn alloy has a minor effect on the corrosion behavior of the Mg-rich matrix. However, the corrosion rate of as-cast Mg-xAl and Mg-xAl-lZn alloys which contain precipitate, depends mainly upon the corrosion behavior of the Mg-rich matrix, which is influenced by the Al content. It depends additionally upon the variation of the Anode-Cathode Area Ratio (ACAR) and the chunk breakage of precipitate during corrosion.