Ammonia and hydrogen are considered promising fuels for achieving zero carbon emissions in internal combustion engines. However, the mechanism of NOx formation in ammonia–hydrogen combustion remains insufficiently studied owing to the complex interaction between thermal NOx and fuel NOx. This study investigates the effects of varying equivalence ratios, N2/NH3 ratios, and initial temperatures on NOx formation using a decoupling method. Results show that thermal NOx dominates under all conditions, contributing approximately 64%–75% of total NOx. As the equivalence ratio increases from 0.6 to 1.0, the proportion of thermal NOx decreases by 7.2%. Conversely, increasing the N2/NH3 ratio from 0.8 to 1.2 leads to a reduction in both fuel and thermal NOx, while the relative proportion of thermal NOx increases. The trends in thermal NOx proportion exhibit opposite behavior with respect to equivalence ratio and N2/NH3 ratio. When the inlet temperature rises from 400 K to 480 K, thermal NOx emissions increase by 54.2%. Of the factors studied, temperature has the greatest impact on both thermal and fuel NOx formation. These findings offer valuable insights into NOx emission characteristics for researchers working on ammonia-fueled engines.