In response to the challenges of food spoilage and water pollution caused by pathogenic microorganisms, CeO2/g-C3N4 nanocomposites were synthesized via one-step calcination using thiourea and urea as precursors. Steady-state photoluminescence (PL) spectroscopy analysis demonstrated that 8 wt% CeO2/g-C3N4 exhibited superior electron–hole separation efficiency. Quantitative antimicrobial assays demonstrated that the nanocomposites displayed enhanced bactericidal activity against Escherichia coli, Ralstonia solanacearum, and Staphylococcus aureus. Electron paramagnetic resonance (EPR) spectroscopy analysis verified the generation of hydroxyl radicals (·OH) and superoxide radicals (·O2−) during the photo-Fenton process utilizing CeO2/g-C3N4 nanocomposites. Additionally, 8 wt% CeO2/g-C3N4 nanocomposites demonstrated enhanced photocatalytic degradation of rhodamine B (RhB) and tetracycline hydrochloride (TC) under photo-Fenton conditions.