TiN films were deposited on the AZ 31 magnesium alloy substrates by d.c. magnetron sputtering technique. The surface properties of the films were investigated. The scanning electronic microscope observations reveal the dense structure characteristics of as-deposited TiN films. Under 200°C heat treatment for 30 minutes or 4 times’ heat cycles at 85°C for one hour, no structural defects such as cracks are observed on the surface of the films. Adhesion experiment further demonstrates the stability of the film and the strong combination between the film and the substrate. Nano-indentation experiment shows that the average micro-hardness of TiN film reaches 23.85 Gpa. Finally, the corrosion experiments in simulated body fluid initially reveal the degradation property of TiN film.