The heterojunction constructed of covalent organic frameworks (COFs) with adjustable structure and other photocatalysts has great potential in the field of photocatalysis. However, effectively enhancing the photocatalytic performance of organic heterojunctions by designing the structure of COFs has not been explored. Herein, TPB-TP-COFs fabricated from 1,3,5-tris(4-amino-phenyl)benzene (TPB) and terephthalaldehyde (TP) with different substituents (−H, −OH, −OCH3, −Br and −F groups), were applied to construct g-C3N4/COFs. The performance improvement of the heterojunction could be affected by substituents, and only −OCH3 groups can significantly improve both the photocatalytic phenol oxidation and Cr(VI) reduction. DFT calculation demonstrated that the substituents will affect the electron cloud distribution of CBM, and the location of CBM in the TPB segment is beneficial for the charge transport between TPB-TP-OCH3 and g-C3N4. The enhanced charge transfer from g-C3N4 to TPB segment and the improved light absorption of TPB-TP-OCH3 jointly optimize the photocatalytic redox capacity of g-C3N4/TPB-TP-OCH3. On the basis of this study, regulating the electronic effects of semiconductors played a vital role in improving photocatalytic performance in organic heterojunctions.