The electrochemical properties and the mechanism of formation of anodic oxide films on Mg alloys containing 0-15 mass% Al, when anodized in NaOH solution, were investigated by focusing on the effects of anodizing potential, Al content, and anodizing time. The intensity ratio of Mg(OH)₂ in the XRD analysis decreased with increasing applied potential, while that of MgO increased. Mg(OH)₂ was barely detected at 80 V, while MgO was readily detected. The anti-corrosion properties of anodized specimens at each constant potential were better than those of non-anodized specimens. The specimen anodized at an applied potential of 3 V had the best anti-corrosion property. The intensity ratio of the β phase increased with aluminum content in Mg-Al alloys. During anodizing, the active dissolution reaction occurred preferentially in β phase until about 4 min, and then the current density increased gradually until 7 min. The dissolution reaction progressed in α phase, which had a lower Al content. In the anodic polarization test in 0.017 mol·$dm^{-3}$ NaCl and 0.1 mol·$dm^{-3}$ Na₂SO₄ at 298 K, the current density of Mg-15 mass% Al alloy anodized for 10 min increased, since the anodic film that forms on the α phase is a non-compacted film. The anodic film on the α phase at 30 min was a compact film as compared with that at 10 min.