Photocatalytic hydrogen evolution is a promising method to convert solar energy. Here, the heterojunction structure of g-C 3 N 4 /CdS was modified by NiCoP prepared by one-step method for the first time, and the photocatalyst NiCoP-g-C 3 N 4 /CdS was successfully designed and prepared, which can effectively separate and transfer photogenerated electrons and efficient hydrogen evolution under visible light. Moreover, NiCoP-g-C 3 N 4 /CdS photocatalyst has abundant surface-active sites, and its photocatalytic hydrogen evolution performance has been greatly improved. When NiCoP content was 5 % in NiCoP-g-C 3 N 4 /CdS, the catalytic activity was the highest, and the hydrogen production rate reached an astonishing 55.63 mmol h À 1 g À 1 , which was 23.35 times that of CdS (2.38 mmol h À 1 g À 1 ) and 11.51 times that of g-C 3 N 4 /CdS (4.84 mmol h À 1 g À 1 ). In addition, NiCoP-g-C 3 N 4 /CdS photocatalyst has excellent stability for hydrogen production. The materials were characterized and analyzed by XRD, SEM, TEM, XPS, UV-Vis DRS, FTIR, UPS, N 2 adsorption-desorption process and electrochemical test etc. At the same time, the possible mechanism of NiCoP-g-C 3 N 4 /CdS photocatalytic hydrogen production reaction is proposed. This study provides a new idea for the rational design of heterojunction photocatalyst and transition metal phosphide cocatalyst.