Magnesium spinel ferrite (MgFe2O4) and cerium-doped magnesium spinel ferrite (MgFe2-xCexO4) (x = 0.0, 0.05, 0.1) were synthesized using an inexpensive coprecipitation method. The investigation focused on the influence of cerium on the physicochemical properties and the photocatalytic activity of this material under sunlight irradiation. The various characterization techniques, including X-ray powder diffraction (XRD), Fourier transform infrared spectroscopy (FT-IR), environmental scanning electron microscopy (ESEM-EDX), the Brunauer–Emmett–Teller (BET) method, and vibrating sample magnetometer (VSM), were used to determine the structural, morphological, and magnetic properties of the prepared samples. The increase in cerium percentage was found to better agglomerate the sheet-like morphology formed in the pure spinel and increase the average crystallite size, with a decrease in the magnetic properties. The optical band gap measured by UV–visible spectroscopy decreased from 2.21 eV, 2.21 eV, and 2.36 eV, accompanied by a change in the specific surface area of 47.23 m2/g, 57.86 m2/g, and 47.25 m2/g for MgFe2O4, MgFe1.95Ce0.05O4, and MgFe1.90Ce0.1O4, respectively. The maximum photocatalytic degradation of methylene blue under sunlight irradiation was achieved for the MgFe1.95Ce0.05O4 (58.35%) in the absence of hydrogen peroxide, and the maximum degradation for Fenton-like processes was achieved in the presence of MgFe1.90Ce0.1O4 (91.05%) within 180 min.