To improve the surface roughness of magnesium alloy, we researched and developed a chemical mechanical polishing (CMP) solution for magnesium alloy, and the effect of sodium tartrate on the surface quality of magnesium alloy and the mechanism of action were investigated. Through orthogonal experiments, the composition of the chemical mechanical polishing solution for magnesium alloy was determined as 50 nm particle size, 6 wt.% Al2O3 abrasive, malic acid adjusted pH=5, 1 wt.% sodium tartrate and deionized water. The polished magnesium alloy flakes were characterized by 3D white light interference profilometer and the corrosion inhibition mechanism of sodium tartrate was analysed by X-ray photoelectron spectroscopy (XPS). The surface roughness of magnesium alloy was reduced to 4.626 nm after chemical mechanical polishing in the scan range of 70 μm × 50 μm. By evaluating the valence changes of Mg and O on the surface of magnesium alloy wafers after the original surface, malic acid and sodium tartrate soaking, the reaction equation of magnesium alloy flakes in polishing solution was summarised.