A series of composite TaMgN films with various Mg content were deposited using reactive magnetron sputtering. The microstructural, mechanical, oxidation resistance and tribological properties of the films were measured. The results showed that when the Mg content is between 0 and 11.9 at.-%, the films are composed of fcc-(Ta,Mg)N and hcp-(Ta,Mg)N phases. While the further increase of Mg content induced the appearance of hcp-Mg phase and the films consisted of fcc-(Ta, Mg)N, hcp-(Ta, Mg)N and hcp-Mg, the hardness of the thin films was first increased and then decreased with the increase of Mg content due to the combined action of solution strengthening, internal stress and phase composition. The highest hardness value is 33 GPa, (Mg content is 11.9 at.-%). With a further increase of Mg content, the average friction coefficient further increased gradually, while the wear rate first decreased and then increased.