Deputy attorney general Rod Rosenstein has submitted a letter of resignation to President Donald Trump.
It is effective from May 11.
His departure ends a nearly two-year run defined by his appointment of a special counsel to investigate connections between the Trump campaign and Russia.
The departure had been expected since the confirmation of William Barr as attorney general.
Mr Rosenstein intended to leave in mid-March but stayed on a little longer for the completion of special counsel Robert Mueller’s Russia investigation.
Mr Mueller submitted his report to the Justice Department last month. Mr Rosenstein and Mr Barr concluded that President Trump did not obstruct justice.
Mr Rosenstein, who appointed Mr Mueller in 2017 following the recusal of attorney general Jeff Sessions, had overseen his team’s work for much of the last two years and defended his investigation.