In this present study, a novel visible-light-driven Ag nanoparticles (Ag NPs) decorated P-doped g-C3N4 (Ag/PCN) composites were successfully fabricated via a facile method combination of one-pot pyrolysis and green reduction. The structure information of as-prepared samples were well characterized by X-ray powder diffraction (XRD), scanning electron microscopy (SEM), high-resolution transmission electron microscopy (HRTEM), X-ray photoelectron spectroscopy (XPS), and UV-visible diffuse reflectance spectroscopy (UV–vis DRS), respectively. The photocatalytic bactericidal activity against representative Gram-negative bacteria of E. coli was employed to evaluate the photocatalytic performance of as-prepared samples. Compared to CN, PCN and Ag/CN, the Ag/PCN composites exhibited the highest visible-light-driven bactericidal activity and could completely inactivate 7.0 log CFU mL−1 of E. coli in 60 min, which were main attributed to the narrowed bandgap, the enhanced visible light response and the accelerated separation rate of photo-generated charges via Ag NPs decorating together with P element doping. Meanwhile, the results of radical trapping experiments revealed that the surface produced superoxide radical (O2−) and photo-generated holes (h+) were the dominant active species during photocatalytic disinfection process, based on which the possible bactericidal mechanism was proposed.