Graphitic carbon nitride (g‐C3N4) has received much attention as a metal‐free photocatalyst for dye degradation and sterilization. However, the low photocatalytic bactericidal activity and the difficulty in recycling have limited its applications. Here, oxidatively modified g‐C3N4 grafted with polyethyleneimine (PEI) nanofiber membranes (PVA/PEI‐OCN) was reported to enhance the photocatalytic activity. The modification by PEI grafting could reduce the recombination rate of photogenerated carriers and lead to more electrons for the photocatalytic reaction. In addition, electron spin resonance (ESR) results showed that the generation of reactive oxygen species (˙OH, ˙O2− and 1O2) were significantly enhanced in photocatalysis, leading to the significant enhancement of photocatalytic bactericidal activity and dye degradation. Furthermore, the PVA/PEI‐OCN nanofiber membranes prepared by electrospinning had smooth surfaces and uniform fiber formation, with an average diameter of 380 ± 60 nm. The tensile strength was about 73.5% higher than that of PVA nanofiber membranes. The inhibition diameter of PVA/PEI‐OCN‐4 against Escherichisa coli (E. coil) could reach 20 ± 0.2 mm, and the maximum degradation efficiency of methylene blue solution (10 mg/L) could reach 92.8% within 120 min. This work provided an effective paradigm for the rational design of metal‐free photocatalytic materials for elimination of bacterial and dye contamination.