Rapid degradation of biomedical magnesium alloys under physiological conditions has hindered clinical applications such as bone fixation devices. Herein, in order to mitigate corrosion, a calcium phosphate (CP) coating is prepared on the WE43 magnesium alloy (MA) pretreated with a magnesium phosphate (MP) layer to provide relatively stable deposition conditions for the CP coating and achieve smooth transition from the MA substrate to the CP coating. The MP coating is composed of magnesium ammonium phosphate hexahydrate and magnesium hydrogen phosphate trihydrate and the CP coating with improved homogeneity, compactness, and interface continuity consists of hydroxyapatite, tricalcium phosphate, and dicalcium phosphate anhydrous. The corrosion current density of MA with the composite coating decreases from (1.756 ± 0.678) × 10−4 to (9.096 ± 1.618) × 10−7 A cm−2 and the charge transfer resistance of the modified MA in the simulated body fluid (SBF) increases by 2685 times. Long-term immersion tests in SBF reveal that the composite coating suppresses leaching of magnesium ions and propagation of corrosion along the surface. The corrosion rate after soaking in SBF for 30 days drops to 0.56 mm y−1 which decreases by 77% compared to MA. The formation mechanism of the composite coating and relationship between the surface characteristics and corrosion protection are proposed and discussed.