2,5-diketopiperazine (DKP) was used as a N-containing model compound to investigate the formation pathway of NOx precursors (HCN, NH 3 , and HNCO) during biomass pyrolysis. The experiment was carried out using a tube furnace coupled with a Fourier Transform Infrared Spectrometer in an argon atmosphere. The results showed that NH 3 , HCN, and HNCO were the major N-containing species formed during DKP fast pyrolysis. The largest yield was HCN, followed by NH 3 and lastly HNCO. When the pyrolysis temperature was increased, the yield of NH 3 increased slowly, but the yield of HCN decreased slightly at 800~950 • C and the change accelerate rapidly above 950 • C. Then NH 3 became the main product above 1020 • C. The temperature influence was negligible on the selectivity between HCN and NH 3 from pyrolysis of DKP. H radicals played an important role in competitive reactions. It was also noted that the presence of Na + , K + , Ca 2+ , and Mg 2+ exhibited a catalytic effect on nitrogen conversion during the DKP fast pyrolysis process. K + and Na + were beneficial to the yield of NH 3 , but not to the yield of HCN. Ca 2+ and Mg 2+ could promote the formation of HCN, but prevent the formation of NH 3 .