The emissions of CO2 are increasing year by year, which have led to serious environmental problems. Converting CO2 into valuable fuels through photocatalysis is a promising strategy. In this research, oxygen atoms were successfully innovated into graphitic carbon nitride (CN). Additionally, cobalt porphyrin (CoTPP) was successfully loaded onto the modified carbon nitride (Co/CN). The generation of interfacial electric fields and bending bands between CN and CoTPP was demonstrated experimentally. The electrons in the CN and the holes in the CoTPP were combined to form a unique S-scheme heterojunction structure, and efficient separation of carriers was promoted. As a result, the CO conversion under visible light irradiation reached an impressive 100.70 μmol g−1 h−1. By integrating theoretical and experimental findings, this study underscores the critical role of catalyst design in enabling efficient photocatalytic CO2 reduction.