WASHINGTON — Attorney General William P. Barr dismissed President Trump’s attempts to rebrand the Russia investigation as a criminal plot engineered by former President Barack Obama, saying on Monday that he expected no charges against either Mr. Obama or former Vice President Joseph R. Biden Jr. as a result of an investigation into how their administration handled Russian election interference.
“As long as I’m attorney general, the criminal justice system will not be used for partisan political ends,” Mr. Barr said during a news conference announcing that the gunman in last year’s shooting at Florida military base had links to Al Qaeda.
Mr. Barr said that John H. Durham, the federal prosecutor investigating how law enforcement and intelligence officials confronted Russia’s operations to meddle in the 2016 election, was examining some aspects of the case for potential crimes, but that he was focused on other people, not Mr. Obama or Mr. Biden.
“I don’t expect Mr. Durham’s work will lead to a criminal investigation of either man,” Mr. Barr said. “Our concern over potential criminality is focused on others.”
Mr. Barr did not say who Mr. Durham might be focusing on, but the Justice Department inspector general has previously referred findings about an F.B.I. lawyer’s conduct during the Russia investigation for potential prosecution.
Mr. Barr’s comments served as an unmistakable rebuttal to escalating efforts by Mr. Trump and his allies to reframe the Russia investigation as a plot to sabotage his presidency by Mr. Obama, Mr. Biden and officials in their administration. Mr. Trump has targeted Mr. Obama in a way that no modern sitting president has, accusing his most recent predecessor of unspecified crimes under a vague but politically charged catchphrase, “Obamagate.”
Asked later at the White House about Mr. Barr’s comments, Mr. Trump stood firm in attacking the previous administration. “Obama knew everything that was happening,” Mr. Trump told reporters, again saying ambiguously that “it was a takedown of a president.”
But while Mr. Barr was unwilling to fuel speculation that the Justice Department would target Mr. Obama and Mr. Biden, he himself has done perhaps more than any other Trump administration official to undermine the overall credibility of the Russia investigation.
The attorney general’s handling of the Russia inquiry has come under fire since he first emphasized its findings last year in a way that was more favorable to Mr. Trump than investigators had found.
He has also intervened in cases involving former Trump advisers, including moving this month to withdraw the case against Michael T. Flynn, who twice pleaded guilty to lying to the F.B.I.
Mr. Barr has explained his undoing of the Flynn case and other moves, like intervening to recommend a more lenient sentence for the president’s longtime friend Roger J. Stone Jr., as correcting overreach by other law enforcement officials. Mr. Stone was convicted of seven felonies in a bid to impede a congressional inquiry that threatened the president.
The highly unusual Justice Department move to withdraw the charge against Mr. Flynn spurred accusations that Mr. Barr was further politicizing law enforcement and prompted a federal judge, Emmet G. Sullivan, to appoint an outsider, the former federal judge John Gleeson, to oppose the department in the case.
Judge Gleeson said in a motion filed on Monday that he would submit a brief by June 10 addressing issues in the case, including whether Judge Sullivan has the authority to deny the Justice Department’s motion, any additional investigating he may need to do and whether Judge Sullivan should order Mr. Flynn to show why he should not be held in criminal contempt for perjury. That timetable means that the Flynn matter could drag on into the fall campaign season.
Mr. Barr has also moved to replace Timothy Shea as head of the U.S. attorney’s office in Washington. Mr. Shea, a longtime adviser to Mr. Barr, was the only prosecutor to sign the motion to dismiss the Flynn case after career prosecutors withdrew from it.
On Monday, the White House announced that Mr. Trump planned to nominate Justin E. Herdman, the U.S. attorney for northern Ohio, to replace Mr. Shea, who will become the acting head of the Drug Enforcement Administration.
Mr. Herdman, a former intelligence officer in the Navy Reserve, is known as a relatively apolitical prosecutor who has made a name for himself by pursuing domestic terrorism cases.
Mr. Barr emphasized on Monday, as he has previously, that he believed that law enforcement and intelligence officials unfairly targeted Mr. Trump as they sought in 2016 to understand links between his campaign and Russia.
“We saw two different standards of justice emerge: one that applies to President Trump and his associates, and the other that applied to everybody else,” Mr. Barr said. “We can’t allow this ever to happen again.”
Mr. Barr called the Russia investigation and the investigation of Mr. Trump “a grave injustice” that was “unprecedented in American history.” He also spoke of a trend in recent decades of “increasing attempts to use the criminal justice system as a political weapon.”
“This is not a good development,” he said. “This is not good for our political life. And it’s not good for the criminal justice system.”
Even so, Mr. Barr would not criminally implicate Mr. Obama or Mr. Biden, and he said that improper actions by the previous administration may not turn out to be criminal offenses. “Not every abuse of power, no matter how outrageous, is necessarily a federal crime,” the attorney general said.
He said that voters should be able to choose between Mr. Trump and Mr. Biden, the presumptive Democratic presidential nominee, “based on a robust debate of policy issues,” rather than “efforts to drum up criminal investigations of either candidate.”
Mr. Barr’s public statements on the Russia investigation have outraged Democrats and former national security officials from both parties. He has said that the inquiry was not properly predicated — though an inspector general report found that it was — and that the Trump campaign was spied on, perhaps illegally.
Joshua A. Geltzer, the executive director of the Institute for Constitutional Advocacy and Protection at Georgetown Law School and a former Obama administration national security official, said he was unconvinced that Mr. Barr would not use the Justice Department for partisan ends.
“From an ordinary attorney general, I’d find these reassurances comforting; but, frankly, Attorney General Barr doesn’t seem to use language responsibly,” Mr. Geltzer said. “I’m glad Barr said what he said, but that doesn’t erase the egregious politicization of federal law enforcement he’s overseen.”
Other Trump administration officials and allies have also sought in recent days to undermine the origins of the Russia investigation.
Richard Grenell, the acting director of national intelligence, declassified a document last week that listed the names of some Obama administration officials who made requests during the presidential transition to see fuller versions of classified intelligence reports. The release of the document by Republican senators prompted accusations that Mr. Trump’s supporters were wielding the information for his political benefit.