Magnesium (Mg) and its alloys have been regarded as potential orthopedic implant materials due to their suitable properties but face challenges due to rapid biocorrosion and insufficient bio-functionality, necessitating surface treatment to mitigate dysfunction. In this work, a two-step electrodeposition was employed to construct a ceria/calcium-phosphate (Ce/Ca-P) composite coating on Mg alloys. This construction approach endows multi-functions of the coating. The ceria interlayer ameliorates adhesion strength. The pin-like structure on the outer layer of the Ce/Ca-P coating enhances the antibacterial capabilities of the coating in the early stages of the implantation. The calcium-phosphate outer layer and the ceria interlayer induce the deposition of calcium and phosphate ions promoting bone healing in the mid-term. The introduction of the ceria interlayer significantly reduces the corrosion rate of the Mg alloy by 86.7% improving the corrosion resistance of the alloy, which is of great significance to maintain the service reliability of the device during the long-term service period. The results indicate that the Ce/Ca-P coating exhibits good hemocompatibility and cytocompatibility. This type of developed coating with anti-corrosive and bio-functionalized capability helpfully advances the application of Mg-based bone implants.