Utilizing visible light for water disinfection is a more convenient, safe, and practical alternative to ultraviolet-light sterilization. Herein, we developed silver (Ag) single-atom anchored g-C3N4(P-CN) nanosheets (Ag1/CN) and then utilized a spin-coating method to fabricate the Ag1/CN-based-membrane for effective antibacterial performance in natural water and domestic wastewater. The incorporated Ag single atom formed a Ag1–N6motif, which increased the charge density around the N atoms, resulting in a built-in electric field ∼17.2 times stronger than that of pure P-CN and optimizing the dynamics of reactive oxygen species (ROS) production. Additionally, the Ag1–N6motif inhibited the release of Ag ions, ensuring good biocompatibility. Based on the first-principles calculation, the adsorption energy of O2on the Ag1/CN (−0.32 eV) was lower than that of P-CN (−0.07 eV), indicating that loaded Ag single atom can lower the energy barrier for O2activation, generating extra *OH radicals that cooperated with *O2–to effectively neutralize bacteria. As a result, the Ag1/CN powder-catalyst with the concentration of 30 ppm demonstrated a 99.9% antibacterial efficiency against drug-resistant bacteria (Escherichia coli, Staphylococcus aureus, kanamycin-resistant Escherichia coli, and methicillin-resistant Staphylococcus aureus) under visible-light irradiation for 4 h. This efficacy was 24.8 times higher than that of the P-CN powder catalyst. Moreover, the Ag1/CN-based-membrane can maintain a 99.9% bactericidal efficiency for natural water and domestic wastewater treatment using a homemade flow device, demonstrating its potential for water disinfection. Notably, the visible-light-driven antibacterial efficiency of the Ag1/CN catalyst outperformed the majority of the reported g-C3N4-based catalysts/membranes.