Two π-conjugated covalent organic frameworks (COFs) with nonring imine or benzoxazole ring linkages were prepared by reacting 3,3′dihydrooxybenzidine (BDOH) with 3,5-triformylbenzene (Tb) in the presence or absence of benzimidazole (BDOH-Tb-IM and BDOH-Tb-BO). Although two COFs indicated similar composition, crystalline structures, and morphologies, imine-based BDOH-Tb-IM exhibited a photocatalytic H 2 O 2 production rate of 2490 μmol•g −1 •h −1 in sacrificial reagent-free pure water, higher than that of benzoxazole-based BDOH-Tb-BO-a (1168 μmol•g −1 •h −1 ). The higher photocatalytic activity of BDOH-Tb-IM was attributed to its more efficient photoinduced charge separation and utilization efficiency and different 2e − ORR active sites over the two COFs. This study demonstrated an available ring effect to adjust photocatalytic performance between π-conjugated COFs.