US Attorney General William Barr is stepping down before Christmas, President Donald Trump has announced, reports BBC.
Mr Barr's term was due to end on 20 January, when Mr Trump leaves office.
There had been tension between the two after Mr Barr said there was no widespread evidence of voter fraud in November's election.
He was criticised by Mr Trump for not publicly disclosing that the justice department was investigating Joe Biden's son during the campaign.
Mr Trump tweeted Mr Barr's resignation letter saying: "Our relationship has been a very good one, he has done an outstanding job!"
Mr Barr's letter to the president began by saying he "appreciated the opportunity to update" the president on the Department of Justice's (DOJ) review of voter fraud allegations in the recent election and "how these allegations will continue to be pursued".
He did not give more details about the review, and praised Mr Trump's achievements in office before ending the letter by saying he will depart from his position on 23 December.
Deputy Attorney General Jeff Rosen will serve as acting attorney general, Mr Trump said.
Mr Barr, 70, had previously served as attorney general under President George Bush in the early 1990s.
He came out of semi-retirement in 2019 to replace Jeff Sessions, who was forced out by President Trump over the justice department's appointment of Special Counsel Robert Mueller to investigate alleged Russian meddling in the 2016 election.
Democratic critics of Mr Barr accused him of shielding his ex-boss from justice. Trump supporters recently turned on him due to his unwillingness to support Mr Trump's election lawsuits.
His comments in early December that claims of voter fraud were unproven were a blow to Mr Trump, who has never accepted defeat.
Since 3 November's election, Mr Trump has repeatedly made unsubstantiated claims of widespread voter fraud, and members of his legal defence team have spoken of an alleged international plot to hand President-elect Joe Biden the win.
President Trump's announcement of Mr Barr's departure came at the same time the US electoral college affirmed Mr Biden's presidential election victory, one of the final steps required for him to take office.