Magnesium (Mg) and its alloys have exhibited great potential for orthopedic applications; however, their poor corrosion resistance and potential cytotoxicity have hindered their further clinical applications. In this study, we prepared a calcium phosphate (Ca−P) coating with a micro−nanofibrous porous structure on the Mg alloy surface by a chemical conversion method. The morphology, composition, and corrosion performance of the coatings were investigated by scanning electron microscope (SEM), energy-dispersive spectrometer (EDS), X-ray diffraction (XRD), immersion tests, and electrochemical measurements. The effects of the preparation temperature of the Ca−P coatings were analyzed, and the results confirmed that the coating obtained at 60 °C had the densest structure and the best corrosion resistance. In addition, a systematic investigation into cell viability, ALP activity, and cell morphology confirmed that the Ca−P coating had excellent biocompatibility, which could effectively promote the proliferation, differentiation, and adhesion of osteoblasts. Hence, the Ca−P coating demonstrates great potential in the field of biodegradable Mg-based orthopedic implant materials.