TiN and (Ti,Mg)N thin film coatings were deposited on titanium substrates by using cathodic arc physical vapor deposition (arc-PVD) technique with magnesium contents of 0, 4.24 at% (low Mg) and 10.42 at% (high Mg). The presence of magnesium on both normal (hFOB) and cancer (SaOS-2) osteoblast cell behavior was investigated in (Ti, Mg) N surfaces with or without prior hydroxyapatite (HA) deposition (in simulated body fluid, SBF). Mg incorporation on TiN films was found to have no apparent effect on the cell proliferation in bare surfaces but cell spreading was better on low Mg content surface for hFOB cells. SaOS-2 cells, on the other hand, showed an increased extra cellular matrix (ECM) deposition on low Mg surfaces but ECM deposition almost disappeared when Mg content was increased above 10 at%. HA deposited surfaces with high Mg content was shown to cause a significant decrease in cell viability. While the cells were flattened, elongated and spread over the surface in contact with each other via cellular extensions on unmodified and low Mg doped surfaces, unhealthy morphologies of cells with round shape with a limited number of extended arms was visualized on high Mg containing samples. In summary, Mg incorporation into the TiN coatings by arc-PVD technique and successive HA deposition led to promising cell responses on low Mg content surfaces for a better osteointegration performance.