Abstract Anodization of die-casted AZ91D magnesium alloy was performed in 3 M KOH+0.21 M Na 3PO 4+0.6 M KF base electrolyte with and without Al(NO 3) 3 addition. The anodic film was characterized by using X-ray diffraction (XRD), scanning electron microscopy (SEM), and X-ray photoelectron spectroscopy (XPS). The corrosion resistance of the various anodized alloys was then evaluated in 3.5 wt % NaCl solution using electrochemical impedance spectroscopy (EIS) and immersion testing. The results showed that the anodic film was mainly composed of MgO. The addition of Al(NO 3) 3 into the base electrolyte results in the formation of Al 2O 3 and Al(OH) 3 in the anodic film. The maximum amount of Al 2O 3 was found in the anodic film when the alloy was anodized in the electrolyte containing 0.15 M Al(NO 3) 3. The results of EIS analysis and morphological examination showed that the MgO anodic film modified with Al 2O 3 exhibited the superior corrosiom resistance for AZ91D Mg alloy.