The electronic properties of amorphous carbon nitride were studied by x-ray-absorption near-edge structure (XANES) and valence-band photoelectron spectroscopy (PES). The nitrogen incorporation was found to induce graphitization, as evidenced by an increase of the sp2 cluster in C and N K-edge XANES spectra. The structure is found to be similar to pyridine. Hybridized C–N bond lengths were determined from the position of the σ* resonance of XANES spectra and the obtained results suggest sp2 hybridization. A valence-band PES spectrum showed that the p‐π band became more intense than the p‐σ band upon higher at. % nitrogen addition, which confirmed the role played by the π bonds in controlling the electronic structure of a‐CNx films.