Alternative sources of clean energy with reduced greenhouse gas emissions have to be considered. Among them, the combustion of metal fuels such as aluminum or magnesium is promising. Nitrogen oxides (NOx) are the only undesirable gases produced during such metal combustion. The present study analyzes the amounts of NOx (NO and NO2) produced by a swirled stabilized magnesium flame. Two geometric swirl numbers are considered: 0.7 (low swirl number) and 7.3 (high swirl number). Different air–fuel ratios – equivalence ratio ranging from 0.17 to 1 – are considered, being obtained by changing the mass flow rate of the injected fuel which is a pulverized fuel of pure magnesium particles with a size fraction 50–70 µm. Thermocouples and a bichromatic pyrometer are implemented to monitor the gas temperature and the flame temperature, respectively. Oxygen (O2) is measured using an in-line paramagnetic analyzers and NOx are measured using an IR-UV analyzer.Whatever the swirl conditions and the air–fuel ratio tested, a stabilized flame of Mg is obtained. The metal combustion exhibits very stable performances. NOx emissions versus equivalent ratio follow a bell-shape curve. Under the tested experimental conditions, the amount of NOx never exceeds 7 gNOx/kWh, which is lower than the maximal value of NOx emission from a gasoline engine. The NOx mole fraction increases when the air–fuel ratio increases, as the power dissipated by the flame increases. The temperature of MgO particles in the flame reaches 2250 °C and the gas temperature never exceeds 1400 °C. The thermal NOx formation is estimated applying Zeldovich’s model. The model indicates that NOx can be produced in the gas surrounding the hot MgO particles. For the highest equivalence ratio, even if the gas temperature is still increasing, the NOx production is disfavored in the rich mixture. Based on these results, a global scheme for NOx formation is proposed which includes four successive steps.