As photoelectrochemical catalyst material, Z-scheme heterojunction 3D WO3@Co2SnO4 composites were designed through a hydrothermal-calcination method. The morphology and structure were characterized by SEM, EDS, XRD, XPS, DRS, and Mott-Schottky analysis, and the photoelectrochemical properties were explored with the transient photocurrent and electrochemical impedance. The construction of Z-scheme heterojunction markedly heightened the separation efficiency of photogenerated electron-hole pairs of WO3 and enhanced the light absorption intensity, retaining the strong redox ability of the photocatalyst. The 3D WO3@Co2SnO4 was used as a photocathode for production of H2O2. Under the optimal reaction conditions, the yield of H2O2 can reach 1335 mu mol<middle dot>L-1<middle dot>h(-1). The results of free radial capture and rotating disc test revealed the existence of direct one-step two-electron and indirect two-step one-electron oxygen reduction to produce H2O2. Based on the excellent H2O2 production performance of the Z-scheme heterojunction photoelectrocatalytic material, 3D WO3@Co2SnO4 and stainless-steel mesh were used to construct a dual-cathode photoelectric-Fenton system for in-situ degradation of a variety of pollutants in water, such as dye (Methyl orange, Rhodamine B), Tetracycline, sulfamethazine, and ciprofloxacin. The fluorescence spectrophotometry was used to detect hydroxyl radicals with terephthalic acid as a probe. Also, the photocatalytic degradation mechanism was revealed, indicating the dual-cathode photoelectron-Fenton system displayed satisfactory potential on degradation of different types of environmental pollutants. This work provided insights for designing high-activity photoelectrocatalytic materials to produce H2O2 and provided possibility for construction of a photoelectric-Fenton system without extra additions.