Photocatalysis is a green approach that has appeared to be a viable option for the degradation of a variety of organic contaminants. This work outlines the process of preparing the titanium-based metal-organic framework (MIL-125) photocatalysts using a simple solvothermal method. Structural, morphological, and optical analysis of samples (MT18 and MT48) was carried out by XRD, FT-IR, Raman, SEM, TGA, BET, and UV–Vis. Results indicated that the sample prepared at 150 °C and reaction time of 48 h (MT48) has a low crystal size of 7 nm with an optical band gap of 3.2 eV and a surface area of 301 m2 g−1. Under UV–visible light irradiation, the as-prepared MOFs proved to upgrade photocatalytic activity in degrading crude oil spills in saltwater. Effects of catalyst dosage and exposure time on the degradation of an oil spill in seawater were studied and analyzed using UV–Vis spectrophotometry and gas chromatography (GC–MS) which emphasized that the use of 250 ppm of MT48 photocatalyst under UV–Vis irradiation can degrade about 99% of oil spills in water after 2 h of exposure. The study's data revealed that MIL-125 could be used to photocatalyzed the cleanup of crude oil spills.