The morphology of fuel nitrogen in coal and its fate during pyrolysis and the nitrogen species including N-2, HCN and NH3 during coal pyrolysis and gasification have been investigated to clarify the evolution mechanism of fuel nitrogen in heat treatment process. Experimental results show that the morphology of coal nitrogen in the studied Chinese raw coals generally include pyrrolic nitrogen (N-5), pyridinic nitrogen (N-6), quaternary nitrogen (N-Q) and nitrogen-oxide (N-X). Generally, nitrogen in char is transformed to volatile and more stable components during pyrolysis. Char-N is the major source of NO precursors during temperature programmed pyrolysis in 600-800 degrees C. N-5 and N-X in char is converted to HCN first, and HCN is then hydrogenated to NH3. N-Q in char is the main source of nitrogen gas. The major nitrogenous gas products during rapid coal pyrolysis are N-2, HCN and NH3, amongst which N-2 is dominant. The yields of N-2 and NOx precursors, such as HCN and NH3, increase with increased pyrolysis temperature. The major gaseous nitrogenous products during coal gasification in steam include HCN, NH3 and N-2. H2O is the main source of the groups containing hydrogen, which not only participates in the reaction as a gasification agent, but also has catalysis on the reaction.