Near-edge X-ray absorption fine structure (NEXAFS) measurements have been made on carbon nitride films containing as much as 44at.% of nitrogen. The films have been synthesized by dual ion beam deposition (IBD) bombarding a carbon target with low-energy nitrogen ions at varying nitrogen beam energies and substrate temperatures ranging from the liquid nitrogen temperature up to 400°C. The structural changes induced by the reduction of the temperature have been previously investigated [Hammer et al., J. Vac. Sci. Technol. A 15 (1) (1997) 107; Baker et al., Surf. Coat. Technol. 97 (1997) 544]. The transition from a predominantly sp 2 /sp 3 CN amorphous arrangement to a more polymer-like structure has been confirmed and more deeply examined by X-ray absorption spectroscopy. In particular, for samples deposited at liquid nitrogen temperature, a relevant reduction of sp 2 CC fraction has been detected. Moreover, the condensation on the growing film surface of hydrogen containing species (i.e. HCN) has been well identified by the appearance of the CH ∗ peak.