Process for treating a feedstock comprising a plastics pyrolysis oil comprising chlorinated compounds, comprising: a) a selective hydrogenation step performed in a reaction section fed at least with said feedstock and a gas stream comprising hydrogen, in the presence of at least one selective hydrogenation catalyst, at a temperature of between 100 and 280°C, a hydrogen partial pressure of between 1.0 and 10.0 MPa abs. and an hourly space velocity of between 0.3 and 10.0 h -1, to obtain a hydrogenated outflow; b) a hydrotreatment step performed in a hydrotreatment reaction section, using at least one fixed-bed reactor having n catalytic beds, n being an integer greater than or equal to 1, each comprising at least one hydrotreatment catalyst, said hydrotreatment reaction section being fed at least with said hydrogenated outflow from step a) and a gas stream comprising hydrogen, said hydrotreatment reaction section being operated at a temperature of between 250 and 430°C, a hydrogen partial pressure of between 1.0 and 10.0 MPa abs. and an hourly space velocity of between 0.1 and 10.0 h -1, to obtain a hydrotreatment outflow; c) a hydrocracking step performed in a hydrocracking reaction section, using at least one fixed-bed reactor having n catalytic beds, n being an integer greater than or equal to 1, each comprising at least one hydrocracking catalyst, said hydrocracking reaction section being fed at least with said hydrotreated outflow from step b) and a gas stream comprising hydrogen, said hydrocracking reaction section being operated at a temperature of between 250 and 480°C, a hydrogen partial pressure of between 1.5 and 25.0 MPa abs. and an hourly space velocity of between 0.1 and 10.0 h -1, to obtain a hydrocracked outflow; d) a separation step, fed with the hydrocracked outflow from step c) and an aqueous solution, said step being performed at a temperature of between 50 and 370°C, to obtain at least one gaseous outflow, an aqueous outflow and a hydrocarbon-containing outflow. a) a selective hydrogenation step performed in a reaction section fed at least with said feedstock and a gas stream comprising hydrogen, in the presence of at least one selective hydrogenation catalyst, at a temperature of between 100 and 280°C, a hydrogen partial pressure of between 1.0 and 10.0 MPa abs. and an hourly space velocity of between 0.3 and 10.0 h -1, to obtain a hydrogenated outflow; b) a hydrotreatment step performed in a hydrotreatment reaction section, using at least one fixed-bed reactor having n catalytic beds, n being an integer greater than or equal to 1, each comprising at least one hydrotreatment catalyst, said hydrotreatment reaction section being fed at least with said hydrogenated outflow from step a) and a gas stream comprising hydrogen, said hydrotreatment reaction section being operated at a temperature of between 250 and 430°C, a hydrogen partial pressure of between 1.0 and 10.0 MPa abs. and an hourly space velocity of between 0.1 and 10.0 h -1, to obtain a hydrotreatment outflow; c) a hydrocracking step performed in a hydrocracking reaction section, using at least one fixed-bed reactor having n catalytic beds, n being an integer greater than or equal to 1, each comprising at least one hydrocracking catalyst, said hydrocracking reaction section being fed at least with said hydrotreated outflow from step b) and a gas stream comprising hydrogen, said hydrocracking reaction section being operated at a temperature of between 250 and 480°C, a hydrogen partial pressure of between 1.5 and 25.0 MPa abs. and an hourly space velocity of between 0.1 and 10.0 h -1, to obtain a hydrocracked outflow; d) a separation step, fed with the hydrocracked outflow from step c) and an aqueous solution, said step being performed at a temperature of between 50 and 370°C, to obtain at least one gaseous outflow, an aqueous outflow and a hydrocarbon-containing outflow.