In this paper we study the formation of NO in laminar, nitrogen diluted methane diffusion flames that are seeded with ammonia in the fuel stream. We have performed numerical simulations with detailed chemistry as well as laser-induced fluorescence imaging measurements for a range of ammonia injection rates. For comparison with the experimental data, synthetic LIF images are calculated based on the numerical data accounting for temperature and fluorescence quenching effects. We demonstrate good agreement between measurements and computations. The LIF corrections inferred from the simulation are then used to calculate absolute NO mole fractions from the measured signal.The NO formation in both doped and undoped flames occurs in the flame sheet. In the undoped flame, four different mechanisms including thermal and prompt NO appear to contribute to NO formation. As the NH3 seeding level increases, fuel-NO becomes the dominant mechanism and N2 shifts from being a net reactant to being a net product. Nitric oxide in the undoped flame as well as in the core region of the doped flames are underpredicted by the model; we attribute this mainly to inaccuracies in the NO recycling chemistry on the fuel-rich side of the flame sheet.