Photocatalytic O2 reduction presents a sustainable strategy for H2O2 synthesis, while the in-situ decomposition of H2O2 significantly deteriorates the activity and stability. Here, by introducing anthraquinone centers into covalent organic frameworks (DQTb-COFs), for the first time, we realized the suppression of in-site decomposition of generated H2O2via site-engineering of COFs. Under visible light irradiation, DQTb-COFs achieves an H2O2 generation rate of 1844.1 μmol h−1 g−1 without sacrificial agents, which is about 3.4 times that of its counterpart without anthraquinone centers (DATb-COFs). The generated H2O2 on DATb-COFs is readily reduced into hydroxyl radicals (•OH), which is not observable on DQTb-COFs. Experiments and calculations demonstrated that the anthraquinone centers of DQTb-COFs can enhance the generation of H2O2 by facilitating the utilization of O2 and promoting the desorption of H2O2. This work highlights how to inhibit the in-situ decomposition of H2O2via site-engineering of COFs, and blazes a new trail for highly efficient H2O2 photosynthesis.