In this work,a novel NiP2/g-C3N4 heterojunction via homogeneous precipitation method assisted by ther-mal phosphorization reaction was designed and constructed,and the optimized sample showed the excellent photocatalytic H2 evolution activity under visible-light irradiation,which was nearly 112 times higher than that of pristine g-C3N4 sample.Experimental characterizations and DFT calculations demon-strated that the NiP2 nanoparticles covered on the g-C3N4 surface can form a built-in electric field at the interface to accelerate the transfer of photoexcited electrons from g-C3N4 to NiP2,crucial for hindering the recombination of electron-hole pairs.Moreover,the energy barrier of hydrogen evolution reaction can also vastly reduce when combined NiP2 and g-C3N4 to construct NiP2/g-C3N4 heterojunction.This work represents a method through combing experimental and theoretical tools to thoroughly investigate the mechanism of photocatalytic process.