H2 production from photocatalytic water splitting is an alternative way to develop reproducible energy. As one of the promising visible-light photocatalysts, graphitic carbon nitride (g-C3N4) endures fast recombination of photoinduced charges, which hinders its wide application for water splitting. To this end, novel carbon fiber (CF) and g-C3N4 composite photocatalysts were prepared through a facile two-step approach involving electrospinning and a subsequent calcination process. The incorporation of CF forms intimate interaction with g-C3N4, significantly enhancing the photocatalytic hydrogen production rate of the latter under visible light irradiation (λ ≥ 420 nm), reaching a maximal value of 1080 μmol h−1 g−1 which is about 4.6 times higher than that of pure g-C3N4. The improved photocatalytic activity in the CF/g-C3N4 composites are mainly attributed to the synergic effects of improved separation of electron–hole pairs through efficient electron transfer, increased specific surface area and pore volume, and enhanced visible light absorption. Moreover, a possible photocatalytic mechanism is proposed and verified by photoluminescene, photocurrent and electrochemical impedance spectroscopy. This study contributes to the further promising application of g-C3N4 for H2 production.