Abstract g‐C 3 N 4 (g‐CN) with edge grafting of 4‐(1H‐imidazol‐2‐yl) benzoic acid (IBA) and NiS cocatalysts is fabricated via a one‐pot chemical condensation of monomers with urea and subsequent photodeposition. The successful copolymerization of the IBA in g‐CN (g‐CN/IBA) is easily identified by 13 C NMR spectra, Fourier transformed infrared spectra, and UV–vis absorption spectra. As a result, the acquired copolymer composites exhibit greatly enhanced visible‐light photocatalytic performance for H 2 evolution, in comparison with the undoped g‐CN. The g‐CN‐IBA photocatalyst with the optimal loading amounts of NiS displays an outstanding hydrogen‐evolution rate of 2948.52 µmol g ‐1 h ‐1 under visible light (λ > 420 nm). The maximum apparent quantum efficiency of g‐CN/IBA‐3%NiS is 3.20% at 450 nm. The enhanced activity can be attributed to the synergism of edge grafting of 4‐(1H‐Imidazol‐2‐yl) benzoic acid and loading of NiS cocatalysts, which not only shows a remarkable redshift of the optical‐absorption compared to g‐CN, effectively improving the absorption in the visible range, but also effectively avoids recombination and drives the favorable separation of photogenerated carriers in plane. This work provides a protocol for simultaneously increasing the active sites of light absorption and surface reactions of g‐CN‐based photocatalysts to maximize photocatalytic hydrogen production activity.