The surface oxidation of pyrite can create a (hydr)oxide layer. This configuration constitutes a natural two-semiconductor (tandem) photoelectrochemical cell. Here, we show that an illuminated hematite-pyrite cell produces photocurrent, H2, and O2 by water splitting. Photocurrent is also observed with illumination of hematite alone. The observed current densities are in the same order of magnitude as estimates of banded iron formation deposition rates, and are 400 to 1000 times higher than needed to oxidize, over geologic time, all of the surface water thought to have existed on Mars. Mineral-based water splitting constitutes a potential source of O2 prior to the evolution of oxygenic photosynthesis on Earth. Semiconducting minerals deserve study as photochemical sources of oxidizing power in low-oxygen environments.