Excitonic effects play a crucial role in determining the photocatalytic performance of polymer semiconductors, which has long been ignored. Herein, metal organic frameworks (MOFs, specially NH2-MIL-125) modifying porphyrinic covalent organic frameworks (COFs, specially DhaTph) have been proven to be a suitable model to regulate excitonic effects. The photoluminescence measurements prove that DhaTph presents strong excitonic effects, which can generate 1O2 through an energy transfer process. Remarkably, the construction of the NH2-MIL-125@DhaTph heterostructure can effectively facilitate the dissociation of excitons, resulting in distinct activation of O2 to O2•- and •OH. Benefiting from the enhanced generation of reactive oxygen species, the NH2-MIL-125@DhaTph composite exhibits a superior bactericidal effect and photocatalytic degradation performance. This work provides a deeper insight into the excitonic effects based on COFs during the photocatalytic process and opens a feasible avenue for the regulation of the excitonic effects in porphyrinic COFs.