Photocatalysts made of earth-abundant elements are highly desired for photocatalytic H2 evolution as well as bacterial inactivation without requirement of noble metal (i.e. Pt, Ag). In this study, nickel phosphide (Ni2P) was used as a nonprecious co-catalyst to couple with metal-free g-C3N4 based on Z-scheme type of electron transportation model. The exfoliation of bulk g-C3N4, the in-situ synthesis and anchoring of Ni2P nanoparticles onto the g-C3N4 nanosheets were achieved in one-step by a hydrothermal method without adding any surfactants or templates. The optimized Ni2P/g-C3N4 lamellar nanohydrids exhibited remarkably enhanced visible-light-driven photocatalytic activity for H2 evolution and bacterial inactivation without noble metal loading, and the obtained activity is approximately 22 and 10 times higher than that of pure g-C3N4, respectively. The Ni2P was proposed to effectively trap the photo-generated e− via a Z-scheme type of route, thus significantly promoting the e−-h+ separation and subsequent reduction of protons to generate H2. The bacterial inactivation was found to undergo a direct h+ oxidation process, and therefore the trapping of e− by Ni2P also facilitated h+ accumulation, leading to enhanced bacterial inactivation efficiency. This study demonstrates a proof-of-concept for constructing all-earth-abundant photocatalysts without any noble metal elements for both energy production and environmental application.