The graphitic carbon nitride (CN) incorporated with mixed-valence molybdenum ion has been prepared via in-situ copolymerization to improve the photocatalytic H2 evolution performance. The introduced Mo species existed in mixed valence of Mo4+ and Mo2+ state and its content could be tuned by simply adjusting amount of added MoCl5 in the preparation procedure. The incorporated mixed-valence Mo ions contributed to narrowed band gap, increased electron density and elevated electron motion kinetics, resulting in extended visible light response, promoted separation and transportation of photoexcited charge carriers. The obtained CN–Mo photocatalyst with an optimal content of Mo ions (0.41 wt%) exhibited a robust H2 production activity up to 1.44 mmol h−1 g−1, 18 times higher than that of pristine counterpart.