In this work, corrosion-resistant fluoridated Ca–Mg–P composite coatings were prepared on magnesium alloys via a hydrothermal assisted sol–gel process. All these coatings derived from Coating Sols with different F− concentrations are composed of fluoridated hydroxyapatite, magnesium hydroxide, and dittmarite. When F− concentration of Coating Sol is 0.03 M, the coating exhibited uniform and dense surface, and its thickness reached 32 μm, thus possessing a high charge transfer resistance of 312 ± 12.69 kΩ cm2 in simulated body fluid (SBF). Immersion test in SBF showed that this coating could quickly induce the formation of the mineralized layer, implying relatively high bioactivity. After 49 days of immersion, the original composite coating and newly formed mineralized layer reached 60 μm in thickness, providing effective long-term protection for magnesium alloys. These attractive results indicate that this fluoridated Ca–Mg–P composite coating is a promising protective coating on biodegradable magnesium and magnesium alloy implants for orthopaedic applications.