The attorney general had said there was a lack of evidence of any widespread voter fraud in the presidential election, breaking with Donald Trump.

President Donald Trump said Monday that Attorney General William Barr had resigned, after the nations top law enforcement official refused to back up discredited claims of widespread fraud in the Nov. 3 election and reportedly worked to avoid public disclosure of investigations into President-elect Joe Bidens son.
Trump said in a tweet that he had a very nice meeting with Barr at the White House, adding that our relationship has been a very good one and that Barr has done an outstanding job!
The president tweeted Barrs resignation letter, which says the attorney general will spend the next week wrapping up a few remaining matters important to the Administration and depart on December 23rd. Deputy Attorney General Jeff Rosen is set to become acting attorney general.
…Deputy Attorney General Jeff Rosen, an outstanding person, will become Acting Attorney General. Highly respected Richard Donoghue will be taking over the duties of Deputy Attorney General. Thank you to all!
— Donald J. Trump (@realDonaldTrump) December 14, 2020
A Justice Department spokeswoman did not immediately respond to a request for comment.
While some of Barrs recent actions like declining to turn the Justice Department into a direct arm of Trumps presidential campaign have angered Trump, Barr still managed to bend the Justice Department to Trumps will since he took over as attorney general in 2019, just as special counsel Robert Muellers investigation into Russian interference in the 2016 election was coming to a close. Barr issued a letter that misled the public about the findings of that investigation weeks before a fuller version of the special counsel report was released, permanently impacting how the report was received by the public. Mueller, who had known Barr for years, wrote an extraordinary letter calling out Barr for creating public confusion about the actual findings of the report.
Even Barrs belated announcement that hed found no widespread voter fraud that would impact the outcome of the 2020 presidential election came after weeks of silence in which Trump spun out a public narrative about voter fraud that, according to polls, left most Republicans believing the election was stolen. 
Barr used his resignation letter to butter up Trump about the presidents unprecedented achievements for the American people, which Barr said were even more impressive because he faced relentless, implacable resistance from opponents behind what the attorney general called a partisan onslaught … in which no tactic, no matter how abusive and deceitful, was out of bounds. The letter also referenced what Barr described as frenzied and baseless accusations of collusion with Russia.
Barr had reportedly discussed staying on as attorney general if Trump won his reelection bid. Shortly after the presidents defeat, Barr began discussing a potential resignation with his associates, one source told The Washington Post. Another source told The New York Times in early December that Barr was leaving because he believed he had completed the work that he had set out to do with the Justice Department.
In the month after the election, Trump repeatedly expressed frustration with his attorney general. 
On Dec. 12, Trump raged at Barr over the Justice Departments handling of investigations into Hunter Biden, Joe Bidens son. The Biden transition team revealed news of a probe related to Hunter Bidens taxes on Dec. 9, but Barr was aware of investigations since at least this past spring, The Wall Street Journal reported. The lack of public disclosure about the Hunter Biden investigations was not unusual typically, the Justice Department keeps such matters private before an election to avoid the impression that its trying to influence the results. 
Trump retweeted a statement on Saturday saying that if that report was true, Barr should be fired. The president added: A big disappointment! 
Previously, Barr had refuted Trumps repeated claims that the 2020 election was stolen from him. Barr instead told The Associated Press on Dec. 1 that he had not uncovered any evidence of fraud or actions that would change the results of the election. He became the highest-level official to rebut Trumps ongoing effort to overturn the results as states certified the 306-232 electoral vote count.
To date, we have not seen fraud on a scale that could have affected a different outcome in the election, he told AP. Barr added that the departments of Justice and Homeland Security had investigated other claims of tampered voting machines but that so far, we havent seen anything to substantiate that.
The White House has waged a weekslong campaign to challenge the results of the election in a half-dozen battleground states, but Trump has so far lost every legal fight to reverse the vote in those locales and all six states have now certified their ballots. Each declared Biden the winner.
Biden is set to be inaugurated on Jan. 20, and the Trump administration officially signed off on assistance for his transition last week after resisting doing so for days.
You would think if youre in the FBI or Department of Justice, this is the biggest thing you could be looking at, the president said in a Nov. 29 interview with Fox News, alluding to the idea that the Justice Department might be involved in any election malfeasance. Where are they? Ive not seen anything.
Barrs resignation may help him escape Trumps practice of punishing those who disagree with his lies about the election.
The president fired Chris Krebs, the nations top cybersecurity official, last month after the office he led, the Cybersecurity and Infrastructure Security Agency, said it found no evidence of votes being deleted, lost or compromised in any way.
Barrs predecessor, Attorney General Jeff Sessions, was also forced out amid the presidents displeasure. Trump regularly complained that Sessions hadnt done enough to stop the special counsel investigation into his 2016 campaigns ties to Russia.
In the AP interview earlier this month, Barr also addressed the Trump campaigns use of the court system to try to overturn things it didnt like, saying there needed to be a foundation to believe a crime had been committed before going to court.
Theres a growing tendency to use the criminal justice system as sort of a default fix-all, and [if] people dont like something, they want the Department of Justice to come in and investigate, the attorney general said.