The construction of heterojunctions to delay photogenerated electron (e
−) and hole (h
+) recombination by integrating the advantages of ternary sulfides and two-dimensional (2D) planar covalent organic frameworks (COFs) is an effective strategy for enhancing photocatalytic performance. In this work, CdIn
2S
4/COF (CIS-COF) composites with an S-scheme heterostructures were fabricated via a self-assembly method. The CIS-COF composites combine the broad light absorption and high specific surface area of COFs with the strong conduction band (CB) reduction capability of CIS, leading to efficient charge separation through the S-scheme mechanism. Compared with pristine CIS (4669.8 μmol g
−1 h
−1) and COF (1729.8 μmol g
−1 h
−1), CIS-COF achieved a markedly higher hydrogen peroxide (H
2O
2) yield of 11889.4 μmol g
−1 h
−1. Electron paramagnetic resonance (EPR) analysis revealed that superoxide and hydroxyl radicals were the dominant reactive species. The interfacial charge transfer pathway was elucidated using
in-situ light-illuminated X-ray photoelectron spectroscopy (XPS), Kelvin probe force microscopy (KPFM), and femtosecond transient absorption spectroscopy (fs-TA). Ultraviolet photoelectron spectroscopy (UPS) confirmed Fermi level alignments consistent with an S-scheme configuration, supporting the proposed photocatalytic mechanism. The enhanced performance is attributed to the built-in electric field at the heterojunction interface, which promotes directional charge transfer and suppresses recombination. This study highlights the crucial role of COFs in constructing efficient S-scheme heterostructures providing new insights into photogenerated carrier dynamics for high-performance photocatalytic H
2O
2 production.