This research is to produce corrosion protection coatings on magnesium alloys (AZ91D) with good performance and less time and less power consumption by optimising the electrolytes used in plasma electrolytic oxidation processes. Coatings were produced in a NaAlO 2 solution and two composite electrolytes, namely NaAlO 2 /NaBO 2 and NaAlO 2 /NaBO 3 . The effects of borate additives on the coating formation processes, phase structure, microstructure, and corrosion property are discussed. The results indicate that borate additives can greatly increase the coating growth rate and improve the corrosion property by strengthening the micro-arcing growth process and accelerating coating's fuse and re-crystallisation. The coating can have a thickness of about 40 μm with NaBO 3 additives in NaAlO 2 electrolyte after 50-min treatment. The coating thickness is only 8 μm using NaAlO 2 electrolyte. Specifically, the coating produced in NaBO 3 -NaAlO 2 solution achieves the best corrosion resistance among all the coatings due to its uniform, dense, and thick structure.