Corrosion protection by anodization and conversion treatment in phosphate solution was studied by microstructural and electrochemical analysis. Both the anodized and the conversion-treated layers showed sacrificial protection in a solution of sodium chloride. The corrosion current or the dissolving rate of the anodized layer was smaller than that of the conversion-treated surface. The modified layers had another mode of protection to form protective films on magnesium substrate where the original modified layers were mechanically lost. Since the state of magnesium in the anodized layer is close to magnesium oxide, phosphorus in the layer is considered to have an important role in these properties concerning the above corrosion protection.