Amorphous Mo-S-N coatings are known to provide excellent tribological properties in diverse environments due to easy sliding under the influence of MoS 2 tribo-films. However, the role of nitrogen incorporation, the formation mechanism of MoS 2 tribo-film at the sliding interface and the changes in the friction behaviour under different environments are not fully understood. In this study, an amorphous coating with 30 at. % N was deposited in a semi-industrial reactive direct current magnetron sputtering (DCMS) system, using a single MoS 2 target in combination with a secondary plasma source. The coating was predicted to have either a Mo-S-N phase with N filling some of the S sites or a MoS 2 (N 2 ) structure where the gas molecules prevent the formation of a crystalline lamellar structure. Tribological studies performed in vacuum and ambient air resulted in steady-state COF values of 0.03 and 0.15, respectively. High-resolution transmission electron microscopy (HRTEM) analysis performed on the wear-tracks revealed that the low coefficient of friction (COF) in vacuum was attributed to the formation of a thick and continuous lamellar tribo-film with a low amount of nitrogen. Contrarily, in ambient air, the surface oxidation disturbed the formation of a continuous MoS 2 tribo-film from the amorphous coatings, leading to an increase in the COF and wear rate. This study shows through indirect measurements of the chemical composition of the as-deposited coating and wear debris that nitrogen is stored in gaseous form (N 2 ) within the amorphous matrix and is released from the contact during sliding. • Amorphous Mo-S-N coatings with 30 at. % N deposited with high adhesion to steel. • Tribo-film formation and role of N on the lubricating behaviour of Mo-S-N coatings. • COF in vacuum (10 −2 Pa) of 0.03 and in ambient air (24 °C, 20–30% RH) of 0.15. • Low friction in vacuum due to formation of a MoS 2 tribo-layer at the sliding interface. • Higher friction in ambient air due to a surface oxide formed at the interface.