Biodegradable magnesium alloys have been widely investigated in the field of biomaterials because they can be gradually dissolved and absorbed by the human body without long-term existence. However, it was found that bare magnesium implants suffered from rapid corrosion. Surface modification is applied to improve the corrosion resistance and biocompatibility of magnesium implants. In this study, Ti-O/HA composite coatings including typical flakes and nanofibers were fabricated on the Mg-Zn alloy. The Ti-O films were deposited on the magnesium alloy by direct current magnetron sputtering, and subsequently coated with HA flakes and nanofibers by electrochemical deposition, respectively. The obtained coatings were investigated by X-ray diffraction, Fourier Transform Infrared spectroscopy and scanning electron microscopy. The corrosion resistance was evaluated by potentiodynamic polarization and hydrogen evolution tests in simulated body fluid at 37 °C. The results show that the compact Ti-O films are composed of particles within the size of 100 nm, the outermost HA coatings are predominantly composed of HA and doped with Na+, Mg2+ ions and functional groups. The stronger diffraction and broader peak in nanofibers than typical flakes around 25.8° are ascribed to the preferential growth in orientation (002). The morphology of HA coatings changed from typical flakes into nanofibers with the addition of NaF, the mechanism to explain the difference is also discussed. The corrosion resistance was improved significantly by the coatings, the corrosion rates in the 10 days were 4.13, 1.77, 0.96 and 0.85 mm/y, respectively. Copyright © 2011 John Wiley & Sons, Ltd.