In the context of the dual-carbon strategy, coal/NH3 co-combustion has emerged as a crucial technological pathway for achieving low-carbon transition. The pyrolysis process of NH3 and coal is of paramount importance for flame stabilization and boiler safe operation. Consequently, a comprehensive understanding of the coal/NH3 co-pyrolysis process and its underlying mechanisms is essential. In this work, the pyrolysis of pyridine, 2-hydroxypyridine, and 2-picolinic acid, which are important derivatives of pyridine, has been systematically investigated to illustrate the influence of oxygen-containing functional group through ReaxFF MD simulations. In addition, the pyrolysis characteristics of the model compounds in different atmospheres (NH3, H2, N2) were also taken into account. The results demonstrate that hydroxyl groups (-OH) and carboxyl groups (-COOH) promote deeper pyrolysis through the generation of active OH radicals. Therefore, this results in faster pyrolysis rates, lower pyrolysis activation energy, and rapid bond cleavage of C-C bonds and C-N in the initial pyrolysis process. Pyrolysis in NH3/H2 atmospheres simultaneously produces H/N-containing free radicals, lowering the activation energy and facilitating the pyrolysis process. Lastly, and most importantly, this work provides the reaction network of model compounds under N2, H2, and NH3 atmospheres. It is worth noting that N-containing groups generated in the NH3 atmosphere participate in carbon-containing fragments, enhancing the early stages of model compound pyrolysis while inhibiting the condensation processes, thereby leading to more short chain carbon compounds and more HCN production. These findings underscore the important influence of NH3 atmosphere on the decomposition of the model compounds. In summary, this research not only elucidates the fundamental principles of N-containing model compound pyrolysis but also provides insights into reaction pathways under high-temperature conditions. The findings offer valuable implications for future experimental and computational studies in this field.