In recent years, the use of antibiotics has greatly increased, which has caused environmental pollution. We offer a photocatalyst based on BiVO4/sulfur-doped g-C3N4 nanocomposite, which was made by a one-step thermal condensation method from thiourea and bismuth vanadate to degradate ciprofloxacin (CIP). The BiVO4/sulfurdoped g-C3N4 photocatalyst was analyzed by certain techniques including XRD, FTIR, BET, FESEM, EDX, TEM, DRS, photoluminesence, and Mott-Schottky to determine various physicochemical properties. The photocatalytic degradation of CIP, as a model pollutant, under visible LED light irradiation was tested to investigate the catalytic performance of nanocomposite. Response Surface Methodology (RSM) was employed to optimize operational parameters, including photocatalyst dosage (50–150 mg), CIP concentration (10–30 mg/L), initial pH of the solution (3–11), and irradiation time (12–120 min). The BiVO4/sulfur-doped g-C3N4 nanocomposite, with a narrow bandgap of 2.15 eV, exhibited exceptional photocatalytic performance in degrading CIP. The optimal conditions for CIP removal were photocatalyst dosage of 120.9 mg, CIP concentration of 10 mg/L, and initial solution pH of 3, resulting in 93.5 % removal efficiency after 105 min of irradiation. The photocatalytic degradation kinetics of CIP followed a pseudo-first-order model with a rate constant (K) of − 0.0221 L/min, indicating rapid degradation process. The photocatalyst maintained excellent performance after 5 reuses, with only a 3 % reduction in efficiency. XRD analysis confirmed the structural stability of the nanocomposite after reuse.