In this paper, molecular dynamics simulation was used to study the effects of temperature, excess air coefficient and ammonia co-combustion ratio on the migration and transformation mechanism of typical nitrogen-containing components and nitrogen elements in the process of ammonia-coal co-combustion. The results show that the increase in temperature accelerates the reaction rate, and the number of NO2 produced decreases. The number of NO decreases first, then increases and finally decreases again. When the temperature is 3000 K, the N2 produced is the least, and the total amount of NO and NO2 is the most. With the increase of excess air coefficient, the number of NO and NO2 increases, and the number of N2 decreases. The final number of N2, NO and NO2 increases with the increase of ammonia co-combustion ratio. However, after analyzing the proportion of N-containing products, it is found that with the increase of ammonia co-combustion ratio, the proportion of N2 generated in the final system increases, while the proportion of NO and NO2 decreases. In addition, when the excess air coefficient is 0.8, with the increase of the mixed combustion ratio of ammonia gas, more precursors of coal char nitrogen generate N2. Finally, the reaction pathways and important intermediates of coal char nitrogen and all nitrogen atoms were explored. © 2024 Science Press. All rights reserved.