Incorporation of transition metals in polymeric carbon nitride (CN) is an effective strategy to enhance its photocatalytic CO2 reduction activity, however, the difference of activity enhancement by incorporating different metals is not well understood. Herein, CN is modified with different transition metals by pyrolyzing the mixtures of urea and metal-organic frameworks (MOFs) to obtain MCN (M = Cu, Co, Ti or Fe). For each given type of metal-modified CN, the photocatalytic CO2 reduction activity is optimized by controlling the content of MOF precursor during pyrolysis. The optimized MCN delivers significantly enhanced CO evolution rate than pure CN, in the order of CN (83 μmol g−1 h−1) < CuCN (246 μmol g−1 h−1) < CoCN (326 μmol g−1 h−1) < TiCN (454 μmol g−1 h−1) < FeCN (490 μmol g−1 h−1). It is revealed that for CuCN and CoCN, Cu and Co are doped in CN. In contrast, for TiCN and FeCN, Ti and Fe exist as TiO2 and Fe2O3 forming Z-scheme heterojunctions with CN. The progressively improved photocatalytic activity corresponds to the increased specific surface area, CO2 adsorption capacity, visible light absorption as well as charge separation and transfer efficiency. Furthermore, we design and prepare bimetal incorporated CN through combining metal doping with heterojunction construction strategies, i.e., Cu doped CN/TiO2 and Co doped CN/Fe2O3, which exhibit further enhanced CO2 photoreduction performance with CO evolution rates of 613 and 718 μmol g−1 h−1, respectively. This work provides insight into the design and preparation of highly efficient CN-based photocatalytic materials.