A simple and practical anodic polarization method was employed to increase the reaction activity of AZ31B magnesium alloy with a cathode electrophoresis coating solution. A thick and compact composite coating on Mg alloy substrate was formed via anodic polarization for 5 min and electroless electrophoresis coating for 7 min. The results of immersion test and electrochemical measurements in 3.5 wt.% NaCl solution showed that the composite coating exhibited a much better corrosion resistance than that of the bare Mg alloy and the single electroless electrophoresis coating film.