Graphitic carbon nitride (CN) has emerged as a highly promising material in the photocatalysis field. However, its bulk structure suffers from a lack of active sites, limiting its practical application. Herein, a boron-doped CN (BCN) was prepared by a green gas-blowing-assisted thermal polymerization and then subjected to different exfoliation processes in order to delaminate the layered structure and tune the surface-active sites. A thorough comparative study shows that thermal exfoliation creates unsaturated nitrogen sites and induces the formation of interconnected layers that act as an electron diffusion channel for better charge transport. Furthermore, the thermally exfoliated BCN is rich in structural disorders that serve as dissociation defects for photoinduced charge carriers with a low exciton binding energy of 27 meV. Experimental results supported by theoretical calculations show that the nitrogen adjacent to boron is activated by the surrounding surface amino groups and the perforated texture to serve as an active adsorption site towards CO2 and H2O. Consequently, the exfoliated BCN acts as an outstanding bifunctional photocatalyst towards CO2 reduction into CO (40.41 μmol g−1 h−1) and prominent hydrogen evolution (4740 μmol g−1 h−1, 12.2% apparent quantum yield (AQY)).