The thermal stability of carbon nitride films, deposited by reactive direct current magnetron sputtering in N2 discharge, was studied for postdeposition annealing temperatures TA up to 1000 °C. Films were grown at temperatures of 100 °C (amorphous structure) and 350 and 550 °C (fullerenelike structure) and were analyzed with respect to thickness, composition, microstructure, bonding structure, and mechanical properties as a function of TA and annealing time. All properties investigated were found to be stable for annealing up to 300 °C for long times (>48 h). For higher TA, nitrogen is lost from the films and graphitization takes place. At TA = 500 °C the graphitization process takes up to 48 h while at TA = 900 °C it takes less than 2 min. A comparison on the evolution of x-ray photoelectron spectroscopy, electron energy loss spectroscopy and Raman spectra during annealing shows that for TA > 800 °C, preferentially pyridinelike N and –C≡N is lost from the films, mainly in the form of molecular N2 and C2N2, while N substituted in graphite is preserved the longest in the structure. Films deposited at the higher temperature exhibit better thermal stability, but annealing at temperatures a few hundred degrees Celsius above the deposition temperature for long times is always detrimental for the mechanical properties of the films.