The corrosion resistance characteristics of three coatings on magnesium alloy AZ31-conventional paint with phosphate film, cathodic electrodeposition coating (E-coating), and E-coating pretreated with silane (Mg/silane/E-coating)-have been studied by means of electrochemical impedance spectroscopy (EIS) in a 3.5 wt% NaCl neutral aqueous solution and salt spray test using ASTM B117. Silane film was obtained by dipping AZ31 specimens in diluted hydroalcoholic silanic solutions and successively curing. It was found that the corrosion resistance of the Mg alloy with E-coating was superior to conventional paint and could be further enhanced with silane pretreatment as an interfacial film. The results of water volume fraction (U saturation ) and diffusion coefficient (D) also indicated that the Mg/silane/E-coating possessed excellent compactness and corrosion resistance. A model of the corrosion mechanism for Mg/silane/E-coating has been presented through EIS analysis.