A photo-enhanced Zn–air battery with simultaneous highly efficient in situ H2O2 generation for wastewater treatment was constructed.