TiN and (Ti,Mg)N thin film coatings were deposited on Ti substrates by an arc-physical vapor deposition technique. The effect of cell presence on hydroxyapatite (HA) formation was investigated using surfaces with four different Mg contents (0, 8.1, 11.31, and 28.49 at.%). Accelerated corrosion above 10 at.% Mg had a negative effect on the performance in terms of both cell proliferation and mineralization. In the absence of cells, Mg-free TiN coatings and low-Mg (8.1 at.%)-doped (Ti,Mg)N surfaces led to an early HA deposition (after 7 days and 14 days, respectively) in cell culture medium (DMEM), but the crystallinity was low. More crystalline HA structures were obtained in the presence of the cells. HA deposits with an ideal Ca/P ratio were obtained at least a week earlier, at day 14, in TiN and low-Mg (8.1 at.%)-doped (Ti,Mg)N compared with that of high-Mg-containing surfaces (> 10 at.%). A thicker mineralized matrix was formed on low-Mg (8.1 at.%)-doped (Ti,Mg)N relative to that of the TiN sample. Low-Mg doping (< 10 at.%) into TiN coatings resulted in better cell proliferation and thicker mineralized matrix formation, so it could be a promising alternative for hard tissue applications.