The influence of the surface roughness of Mg alloys on the electrical properties and corrosion resistance of oxide layers obtained by plasma electrolytic oxidation (PEO) were studied. The leakage current in the insulating oxide layer was enhanced by increasing the surface roughness, which is a favorable characteristic for the material when applied to hand-held electronic devices. The variation of corrosion resistance with surface roughness was also investigated. The corrosion resistance was degraded by the increasing surface roughness, which was confirmed with DC polarization and impedance spectroscopy. Pitting corrosion on the passive oxide layer was also analyzed with a salt spray test, which showed that the number of pits was not affected by the surface roughness when the spray time reached 96 h.