The formation of NO* precursors during rapid pyrolysis was investigated for 20 coalscovering wide ranks at temperatures of 853-1488 K to elucidate the influence of coal properties on NO* formation during coal combustion. It was found that the main compositions of volatile nitrogen are HCN, NH3, and N2 under these experimental conditions. Their yields are strongly dependent on coal types and pyrolysis temperature. By analyzing functional forms of coal nitrogen in parent coals and chars after pyrolysis using X-ray photoelectron spectroscopy, the relation between nitrogen functionality and formation of nitrogen-containing species has been further demonstrated. Three nitrogen functional forms of pyrrole type, pyridine type, and quaternary nitrogen are observed for all coals. A proportion of each functional form is dependent on coal type. The variation of the nitrogen functional forms in chars during pyrolysis is quantitatively compared with the yield of nitrogen-containing species. Quaternary nitrogen converts finally to NH3, and a part of the pyrrole and pyridine type nitrogen converts to HCN.