NOx formation during coal utilisation typically derives from thermal decomposition of N-containing compounds pyrrole, which usually combines with an aromatic ring in the form of indole. NH3 and HCN are common precursors of NOx from the decomposition of N-containing compounds. In this study, possible pathways of indole pyrolysis to form HCN and NH3 are investigated using the density functional theory (DFT) method. Calculation results indicate that indole pyrolysis has two type of possible initial reactions, which are internal hydrogen transfer and hydrogen homolysis reaction, respectively. The initial reaction mode of indole has a great impact on the subsequent pyrolysis pathway. Additionally, it is shown that indole can produce two nitrogen-containing products, i.e. HCN and NH3. Five pathways will result in the formation of HCN (path-1, path-3, patha, path-b, path-c), and another two pathways will lead to the NH3 (path-2, path-4). Furthermore, among all the reaction mechanisms of indole pyrolysis, the path-1 is the optimal reaction pathway. During which, indole is converted to a diradical intermediate, then the intermediate undergoes a synergy ring-opening transition state to form a new intermediate. Afterwards, the new intermediate decomposes into CN by homolysis of the CC bond.