A selective removal of nitrogen compounds from gasoils is proposed, using a recyclable sorbent capable of forming charge-transfer complexes; the selective elimination of nitrogen compounds strongly improves the hydrodesulfurization (HDS) of denitrogenated feed.