In this paper, we designed a composite photocatalytic system in which cobalt nanoparticles (Co NPs) are attached to nitrogen-doped carbon (N- d -C) and co-bonded to the surface of the noted photocatalyst graphite carbon nitride (g-C 3 N 4 ), showing an excellent photocatalytic hydrogen production. The bulk g-C 3 N 4 was formed in the first thermal treatment in air using melamine as a precursor. Subsequently, the secondary calcination under N 2 led to the synchronous fabrication of N- d -C/Co NPs and their combination with g-C 3 N 4 to form a novel ternary photocatalyst (g-C 3 N 4 /N- d -C/Co NPs). Co NPs exposed on the surface of the nanomaterials endowed much more reaction sites than g-C 3 N 4 for photocatalytic hydrogen production. Meanwhile, the embedded N- d -C provided an additional transfer approach for photocarriers. The as-prepared composite nanomaterials own a relatively high specific surface area of 97.45 m 2 g −1 with an average pore size of 3.83 nm. As a result, compared with pristine g-C 3 N 4 (∼25.35 μmol g −1 h −1 ), the photocatalytic performance was increased by over 10 times (∼270.05 μmol g −1 h −1 ). Our work gives a novel approach for highly active g–C 3 N 4 –based photocatalysts in the field of photocatalysis. • g-C 3 N 4 /N- d -C/Co NPs were prepared by co-calcination with Co-L-his complex. • The bandgap of g-C 3 N 4 /N- d -C/Co NPs were narrowed to ∼2.72 eV. • Hydrogen evolution rate of g-C 3 N 4 /N- d -C/Co NPs is over 10 times that of pristine g-C 3 N 4 . • An approach to enhance solar-driven photocatalytic performance of g-C 3 N 4 was provided.