In this work, oily compost leachate (OCL) generated during oily sludge composting was treated by UV/TiO2. OCL subsamples, gathered bi-weekly from the composting process, were thoroughly mixed and then filtered to reduce the solution turbidity. The effects of initial chemical oxygen demand (COD) concentration, UV type (A and C), pH (3, 7, and 11), reaction time (30, 60, 90, and 120 min), and TiO2 concentration (0.5, 1, and 2 g L-1) on the total petroleum hydrocarbons (TPH) and COD removal from OLC were examined. The results showed that the efficiency of the process improved with the increase in TiO2 concentration and reaction time and the decrease in pH and pollutant concentration. In the optimal conditions (UV-C, TiO2 concentration of 1 mg L-1, reaction time of 90 min, and pH of 3), 52.29% of TPH was removed. Moreover, 36.69 and 48.3% of TPH was reduced by UV-A/TiO2 and UV-C/TiO2, respectively in real conditions of OCL (pH = 6.3, COD = 1501. 24 mg L-1, and TPH = 170.12 mg L-1) during the 90 min reaction time. The study verified that UV/TiO2 has the potential to be applied to treat OCL.