A novel environmentally-friendly composite coating with a cerium conversion coating deposited on the phytic acid conversion sample was formed on an AZ31B magnesium alloy. The optimum processing parameters of the composite coating on the AZ31B magnesium alloy were investigated by hydrogen evolution method. The surface morphology, chemical nature and corrosion resistance of the composite coating were examined by SEM, EDS, FTIR, XRD, electrochemical measurements and hydrogen evolution method. The results show that the optimum processing parameters of the composite coating on the AZ31B magnesium alloy are cerium nitrate solution concentration of 0.06 mol/L, treating time of 30 min and treating temperature of 50 degrees C. The composite coating has better uniformity than the phytic acid conversion coating and it is composed of O, C, P. Mg, Al and Ce. The P-OH, HPO42-, PO43-, CeO2 and a little Ce(OH)(2) exist in the surface of the composite coating and the composite sample has best corrosion resistance than the untreated sample, chromate conversion sample and phytic acid conversion sample. The synergistic mechanism was also discussed. (C) 2012 Elsevier B.V. All rights reserved.