In situformation of p-n heterojunctions between TiO2and CuxO in heteroatom-doped carbon nanocomposites and their applications in photocatalytic H2evolution were demonstrated. One-step pyrolysis of bimetal-organic-frameworks NH2-MIL-125(Ti/Cu) in steam at 700 °C forms a p-n heterojunction between TiO2and CuxO nanoparticles. Concurrently, a phasejunction between nitrogen/carbon co-doped anatase and rutile TiO2is formed, accompanied by the formation of CuxO heterostructures. These multi-heterostructures are embedded in N-containing and hydrophilic carboxyl functionalized carbon matrix. The optimized TiO2/CuxO/C composite multi-heterostructures offer multiple pathways for photoinduced electrons and holes migration, absorb more visible light, and provide an increased number of active sites for photocatalytic reactions. Without loading expensive noble metals, the TiO2/CuxO/C nanocomposite derived at 700 °C in steam exhibited a superior photocatalytic H2generation activity of 3298 μmol gcat−1h−1under UV-Visible light, 40 times higher than that of commercial TiO2. This work offers a simple approach to fabricate novel photocatalytic nanocomposites for efficient H2generation.