The evolution of the early atmosphere was driven by changes in its chemical composition, which involved the formation of some critical gases. In this study, we demonstrate that nitrous oxide (N2O) can be produced from Miller’s early atmosphere (a mixture of CH4, NH3, H2, and H2O) by way of photocatalysis. Both NH3 and H2O were indispensable for the production of N2O by photocatalysis. Different conditions related to seawater and reaction temperature are also explored. N2O has a strong greenhouse gas effect, which is more able to warm the Earth than other gases and offers a reasonable explanation for the faint young Sun paradox on the early Earth. Moreover, the decomposition of N2O into N2 and O2 can be boosted by soft irradiation, providing a possible and important origin of atmospheric O2 and N2. The occurrence of O2 propelled the evolution of the atmosphere from being fundamentally reducing to oxidizing. This work describes a possible vital contribution of photocatalysis to the evolution of the early atmosphere.