Amorphous W-S-N in the form of thin films has been identified experimentally as an ultra-low friction material, enabling easy sliding by the formation of a WS 2 tribofilm. However, the atomic-level structure and bonding arrangements in amorphous W-S-N, which give such optimum conditions for WS 2 formation and ultra-low friction, are not known. In this study, amorphous thin films with up to 37 at.% N are deposited, and experimental as well as state-of-the-art ab initio techniques are employed to reveal the complex structure of W-S-N at the atomic level. Excellent agreement between experimental and calculated coordination numbers and bond distances is demonstrated. Furthermore, the simulated structures are found to contain N bonded in molecular form, i.e. N 2 , which is experimentally confirmed by near edge X-ray absorption fine structure and X-ray photoelectron spectroscopy analysis. Such N 2 units are located in cages in the material, where they are coordinated mainly by S atoms. Thus this ultra-low friction material is shown to be a complex amorphous network of W, S and N atoms, with easy access to W and S for continuous formation of WS 2 in the contact region, and with the possibility of swift removal of excess nitrogen present as N 2 molecules.