Thermochemical treatment of oily sludge (OS) has been demonstrated to be an effective approach for resource and energy recovery. However, the migration and emission of potential pollutants have limited its further development. In this study, the environmental impacts, including aromatic compounds in liquid products, N-, S-, and Cl-containing pollutants in gaseous products, and residual organic matter and heavy metals in solid residues, during the pyrolysis, gasification, and combustion processes of OS are comparatively investigated. The results indicate that the aromatics in the liquid products obtained from pyrolysis and gasification are primarily hydrocarbons with 10, 14, and 16 carbon atoms, and the corresponding degree of unsaturation is between 7 and 16. By contrast, the aromatics produced during combustion are mainly hydrocarbons with 10–12 carbon atoms and an unsaturation degree of 7. The liquid products from gasification of OS contain aromatics with more carbon atoms and a higher degree of unsaturation, suggesting potential issues of recalcitrant aromatics and tar by-products during the gasification process. The release behaviors of N-, S-, and Cl-containing pollutants during the thermochemical treatment of OS are closely related to the specific thermochemical technology and treatment temperature. At 550 °C, these pollutants are gradually released from the OS. By contrast, at 950 °C, they are released over a narrow temperature range with significantly higher concentrations. Furthermore, compared with the peak concentrations of SO2 and HCl during thermochemical processing at 550 °C, these values increase by 1–2 orders of magnitude at 950 °C. With the increase in treatment temperature, the loss on ignition (LOI) of residues from pyrolysis or gasification of OS gradually decreases and stabilizes around 0.5 %. On the other hand, the LOI from combustion fluctuates around 1.0 %. In addition, the removal rates of total organic carbon in the residues from all three thermochemical processes exceed 98.89 %. However, the potential ecological risks associated with heavy metals in the residues from thermochemical treatment of OS also increase to some extent. Cr, Cu, and Zn are found to evaporate and escape into liquid and gaseous products, while Pb is retained in the residues. Notably, the residue from combustion poses the highest environmental risks among the three processes.