The heavy sludge formation in diesel tanks is one of the major issues in oil companies and petrochems.The accumulated sludge induces clogging of suction, vents pipes, and decreases fuel quality and tank capacity.Hence, in the present study, the utilization of magnetic diesel tank sludge (MDTS) as a photocatalyst for methylene blue (MB) removal was investigated for the first time.The MDTS was characterized using Fourier transform IR spectroscopy (FTIR), vibrating sample magnetometer (VSM), and X-ray diffraction (XRD).The effects of various operational parameters including pH, MDTS dose, MB concentration, and exposure time of UVC14w on the MB removal were considered using the response surface methodol. (RSM).The maximum removal of MB was 83% under optimal conditions of pH 5, MDTS dose of 100 mg/L, UVC14W irradiation time of 240 min, and MB concentration of 80 mg/L.Moreover, the MB removal process was endothermic and followed the Langmuir isotherm (R2 = 0.9634) and pseudo-second-order kinetic (R2 = 0.9953).The increase of ΔG° was endothermic and spontaneous.The pos. value of ΔH° (224.029 KJ.mol-1) implied that the removal process is endothermic.The neg. value of ΔS° (- 703.763 KJ.mol-1K-1) reflected the increased randomness during the removal process.It is interesting to mention that the MDTS contains 40% carbon and 64% Fe3O4, as an ideal precursor for magnetic photocatalyst synthesis.The results of this study can open a window toward a green environment.