The influence of structural characteristics, in particular heteroatom content, on the ammonia-treatment of carbon-13 materials has been studied. The resulting carbon-13 materials were investigated for their temperature-programmed combustion characteristics by thermogravimetric analysis-mass spectrometry (TO-MS). The use of ca 99% isotopically pure carbon-13 allowed the analysis of N2O and N-2 in the presence of CO2 and CO respectively. Bimodal peaks for N-2, NO and N2O were detected in temperature-programmed combustion, suggesting two types of nitrogen functionality in the carbon. The relative yields of the three products were strongly influenced by the heteroatom content of the precursor sample. The sample which had a high heteroatom content gave N-2 as the major product rather than N2O. Oxygen, present as an impurity in the carbons, is an important factor in the incorporation of nitrogen by treatment with ammonia.