Covalent organic frameworks (COFs) constitute a novel category of porous materials that exhibit considerable promise for photocatalysis, particularly in the production of hydrogen peroxide (H2O2). A novel COF distinguished by a pyrene-anthraquinone architecture (denoted as Py-DQ-COF) was successfully prepared through a solvothermal process. The pyrene moiety acts as an electron-rich component, while the anthraquinone moiety serves as its electron-deficient counterpart. The strategic integration of these two moieties as essential building blocks in the formation of a donor-acceptor type Py-DQ-COF structure facilitates the efficient separation of electron-hole pairs. By employing benzylamine as a sacrificial reagent and utilizing water as the solvent, this study meticulously explores the photocatalytic efficiency in the production of H2O2. Mechanistic investigations validate that the reaction proceeds through a two-step two-electron (2e−) oxygen reduction reaction pathway, culminating in an impressive H2O2 yield of 15,207 µmol g−1 h−1, significantly exceeding the yields associated with conventional sacrificial alcohols. Cyclic experiments further elucidate that the materials exhibit commendable stability and sustain high activity. This study introduces a new method for the identification of novel sacrificial agents, and integrates anthraquinone into COFs, thereby offering an efficient strategy to optimize the industrial anthraquinone process for H2O2 production. Ultimately, it provides a valuable reference for the advancement of efficient and sustainable photocatalytic systems.