A heterogeneous photocatalyst, MgFe 2 O 4 /UiO-67 (MU-x), was successfully synthesized by doping magnetic magnesium ferrite nanoparticles (MgFe 2 O 4 ) with the UiO-67 metal−organic framework at various weight ratios (MgFe 2 O 4 : UiO-67 at 30, 50, 70, and 90 wt %). Various techniques, including Xray diffraction (XRD), field emission scanning electron microscopy (FE-SEM), Fourier transform infrared spectroscopy (FT-IR) , Brunauer−Emmett−Teller (BET), photoluminescence (PL), vibrating sample magnetometry (VSM), electrochemical impedance spectroscopy (EIS), and ultraviolet−visible diffuse reflectance spectroscopy (UV−vis DRS), were used to characterize the prepared photocatalysts. The photocatalytic performance of MU-x in the degradation of ciprofloxacin (CIP) under visible light was assessed. The CIP degradation efficiency was found to increase as the amount of MgFe 2 O 4 in the composite was increased up to 70 wt %. Experimental conditions were optimized using response surface methodology (RSM) based on central composite design (CCD) with three factors: initial pH, catalyst loading, and CIP concentration. Using the obtained model, the optimal conditions were determined as follows: initial pH of 8.025, catalyst loading of 33.8 wt %, and CIP concentration of 10.8 mg/L. Under these optimal conditions, a notable improvement was achieved, with 99.62% of CIP removal achieved within 90 min, surpassing the performance of previously reported photocatalysts. Total organic carbon (TOC) analysis revealed a high degree of mineralization, at 81.25%. The degradation pathway of CIP was investigated based on liquid chromatography−mass spectrometry (LC-MS) analysis. Finally, the values of E CB and E VB of the photocatalyst were determined and the possible degradation mechanism of CIP was investigated based on Mott−Schottky and the applied scavengers. The hydroxyl radical ( • OH) was identified as the dominant species in the removal of CIP through a trapping experiment. The photocatalyst with 70 wt % of MgFe 2 O 4 (MU-70) exhibited excellent stability and recoverability with an external magnet, demonstrating 86.33% CIP removal after four cycles. According to the obtained results, MU-70 is a promising visible-light-active photocatalyst with great potential for water treatment applications and convenient recovery.