The invention relates to the technical field of composite photocatalysis, in particular to a NiCoP-g-C3N4/CdS composite photocatalyst as well as a preparation method and application thereof. The method comprises the steps of firstly, preparing pure CdS through a solvothermal method, and preparing g-C3N4 by directly calcining urea, wherein the g-C3N4 and the CdS have proper valence band and conduction band structures; preparing a g-C3N4/CdS heterojunction through a chemical adsorption and self-assembly method; then adding a nickel source, a cobalt source and a phosphorus source into ultrapure water according to the mass ratio of 1: 1: 5; after the mixture is fully stirred and dissolved, adding a prepared g-C3N4/CdS composite material, carrying out uniform ultrasonic treatment, completely evaporating moisture to dryness, and finally, calcining to successfully load granular NiCoP on the surface of the g-C3N4/CdS heterojunction. The color of the composite material is related to the doping amount of NiCoP, the color of the composite material is gradually darkened from grass green along with the increase of the doping amount of NiCoP, the prepared composite photocatalyst is applied to a hydrogen evolution experiment, the hydrogen evolution performance is excellent, the hydrogen evolution rate is more than 23 times that of pure CdS, the repeated utilization rate is high, and the composite photocatalyst has a wide application prospect in the field of photocatalysis.