The study aims to fabricate mesoporous TiO2 nanofibers (NFs) with different thallium (Tl) doping ratios (1–2 wt%) using the solution electrospinning method and examine their photocatalytic oxidation activity in the desulfurization of commercial diesel fuel. The results show that the Tl doping restricted the transition of the anatase to rutile fraction, shifting it from an initial composition of 58.3% rutile and 41.7% anatase to a significantly altered state with only 2.4% rutile and 97.6% anatase. Additionally, Tl-doping resulted in a decrease in crystalline size (from 55.4 to 9.5 nm), a reduction in the band gap from 3.2 to 2.93 eV, and a decrease in the diameter of the nanofibers from 200 nm to 100 nm, compared to pristine TiO2 NFs. The most efficient photocatalyst, 1 wt% Tl-doped TiO2 NFs, demonstrated remarkable performance with 98.74% sulphur removal under Xenon lamp irradiation (450 nm, 500 Watts) for 90 min. Under sunlight, the photocatalytic oxidation activity in the desulfurization process resulted in a remarkable reduction of 99.2% in sulphur content, decreasing from 11500 ppm to 98 ppm. Notably, this photocatalyst demonstrated efficient oxidative photocatalytic desulfurization and maintained the recyclability of the solvent over eight cycles without any loss.