The development of robust catalysts that can work under harsh conditions bring promise but a challenge for photocatalytic hydrogen peroxide production. Here, we report the design of thiazole-based homologous heteropolyaromatic COFs (TTT-COF) via post-cyclization reaction for photocatalytic H2O2 production and aerobic oxidation of C(sp3)-H bonds. Our studies demonstrate that the elemental S heteroatom enables modified COF materials with high chemical stability, continuous π-conjugation, efficient electron and energy transfer, and an enhanced donor-acceptor (D-A) structure and charge separation, thus boosting their intrinsic photocatalytic activities and stability. Consequently, TTT-COF achieves a photosynthetic H2O2 production rate of 29.9 mmol g−1 h−1 with more than 200 hours of long-term stability when employing 10 % benzyl alcohol (V/V) as a sacrificial agent. Notably, the TTT-COF photocatalyst exhibits high reactivity in the oxidation of ethylbenzene derivatives. We believe this strategy offers a promising pathway to synthesize homologous heteropolyaromatic COFs and holds the potential for large-scale production of COF materials with tailored properties for broad applications in photocatalysis and beyond.