The remarkable discovery of pyrite-induced hydrogen peroxide (H2O2) provides a key step in the evolution of oxygenic photosynthesis. Here we show that H2O2 can be generated rapidly via a reaction between pyrite and H2O in the absence of dissolved oxygen. The reaction proceeds in the dark, and H2O2 levels increase upon illumination with visible light. Since pyrite was stable in most photic environments prior to the rise of O2 levels, this finding represents an important mechanism for the formation of H2O2 on early Earth.