Recent satellite measurements of a layer of enhanced nitrous oxide (N2O) in the mesosphere‐lower thermosphere (MLT) from the Atmospheric Chemistry Experiment‐Fourier Transform Spectrometer have suggested an unexpected, minor high‐altitude production source. Here we report the development of a mechanism and the first model simulations, which can explain the formation of this MLT N2O layer. N2O production occurs primarily via a reaction route involving the excitation of N2 from secondary electrons. Simulations using the Whole Atmosphere Community Climate Model, with external forcing from the Global Airglow model, quantitatively reproduce the observed vertical, latitudinal, and seasonal N2O variations. Sensitivity results indicate that photoelectrons are far more important than previously predicted, causing approximately two thirds of global N2O production in the MLT. Energetic electron precipitation over high latitudes provides the remaining contribution. Solar cycle analysis reveals N2O enhancements of up to ×2 at solar maximum compared to solar minimum.