Covalent organic frameworks (COFs) have attracted increasing attention as photocatalysts for hydrogen peroxide (H2O2) production owing to their structural tunability and intrinsic optoelectronic properties. However, achieving efficient charge separation and optimizing surface catalytic sites remain key challenges. Here, we report a rationally designed COF featuring triple polar sites-cyano modification on the vinyl linkage, a triazine center, and electron-donating/withdrawing side groups-that synergistically modulate the electronic structure, reducing exciton binding energy and enhancing charge carrier separation and transfer. Concurrently, the incorporation of methoxy groups tailors the hydrophilic surface environment, optimizing active site accessibility and strengthening interfacial interactions with water and oxygen. Consequently, the engineered COF delivers a remarkable H2O2 production rate of similar to 12,000 mu mol g(-1) h(-1) and excellent long-term stability under ambient conditions, outperforming conventional vinyl-COFs. This work establishes a new molecular design strategy for efficient artificial H2O2 photosynthesis by optoelectronic regulation at the molecular level.