The synthesis of hydrogen peroxide from photocatalytic reaction of pure water and oxygen has sparked extensive research, however, most photocatalysts have weak light absorption and fast carrier recombination rates. Herein, a C-doped graphitic carbon nitride g-C3N4 with defects (N vacancies and -C≡N groups) was prepared using a supramolecular preassembly method. The as-prepared photocatalyst (s-B0.3CN) exhibited good H2O2 generation performance (108.4 μM under λ ≥ 420 nm in pure water, 2 h) and efficient degradation of 4-CP in a photocatalysis-self-Fenton process. The structure formed by the C-doped and defects significantly facilitated light absorption and carrier separation, increased the specific surface area of the material and enhanced the adsorption of oxygen. Furthermore, this research contributes the understanding of the mechanisms about photocatalytic H2O2 evolution and photocatalysis-self-Fenton. Simultaneously, dual-channel photocatalytic H2O2 evolution mechanisms (O2 + 2e- + 2H+→ H2O2,2H2O + 2 h+ →H2O2 + 2H+) of s-B0.3CN under irradiation were demonstrated.