A novel approach to improve the corrosion resistance of PEO coating of Mg alloy was developed by adding GO in the electrolyte. The incorporation of GO decreased the porosity of the PEO coating. With 2 g/L GO in the electrolyte, the optimal corrosion resistance was achieved.