In an ABC interview, Barr, the country's top law-enforcement officer, said US President Trump's critical tweets of those involved in the case of Roger Stone "make it impossible for me to do my job".
US Attorney General William Barr said on Thursday that President Donald Trump's attacks on prosecutors, the judge and jurors in the trial of a longtime adviser undermined the Justice Department's work, adding he would not be "bullied" by anyone.
In an ABC interview, Barr, the country's top law-enforcement officer, said Trump's criticism of those involved in the case of Roger Stone "make it impossible for me to do my job".
Barr spoke after his Justice Department abandoned prosecutors' initial recommendation to give the veteran Republican operative seven to nine years in prison, prompting all four prosecutors to quit the case.
Trump has weighed in on Twitter all week with comments that have aroused concerns his administration is weakening the rule of law.
"I'm not going to be bullied or influenced by anybody ... whether it's Congress, a newspaper editorial board or the president," Barr said.
"I cannot do my job here at the department with a constant background commentary that undercuts me," Barr said, adding: "I think it's time to stop the tweeting about Department of Justice criminal cases."
The White House said Trump was not bothered by Barr's remarks.
"The president has full faith and confidence in Attorney General Barr to do his job and uphold the law," White House spokeswoman Stephanie Grisham said in a statement.
Trump's fellow Republicans also expressed support for Barr.
Senate Majority Leader Mitch McConnell, a staunch Trump supporter, said Barr was "a great choice" as attorney general.
"I think if the attorney general says it's getting in the way of doing his job, maybe the president should listen to the attorney general," McConnell told Fox News.
Stone was found guilty in November on seven counts of lying to Congress, obstruction and witness tampering.
Trump posted a Fox News story on Thursday that accused some of the jurors of political bias. "This is not looking good for the 'Justice' Department," he tweeted.
Seth Cousins, who served as a juror in Stone's trial, said he was "appalled" by Trump's remarks.
"It feels like something outrageous is going on," Cousins said in an interview.
"I think it is appalling for the president of the US to be attacking American citizens for patriotically fulfilling their duties," he said.
The Twitter attacks started on Tuesday when Trump criticised US prosecutors in the case stemming from former Special Counsel Robert Mueller's investigation of Russian interference in the 2016 election to benefit Trump's candidacy.
The Republican president called their sentencing recommendation for Stone "horrible" and a "miscarriage of justice". Stone's friendship with Trump dates back decades.
Trump on Wednesday thanked Barr, whom he appointed last year, for "taking charge" of the case. He also tweeted criticism of US District Judge Amy Berman Jackson, who is scheduled to sentence Stone on February 20.
Trump and the Justice Department said they had not had direct talks on the matter.
Former US Attorney Jessie Liu, who oversaw the Stone case, resigned from the Treasury Department this week after the White House dropped her nomination for a post overseeing economic sanctions, a source said on Thursday.
House of Representatives Speaker Nancy Pelosi said Trump's comments on the Stone case amounted to interference in the workings of the US government's judicial branch.
"This is an abuse of power – that the president is again trying to manipulate federal law enforcement to serve his political interest," Pelosi, a Democrat, told a news conference. "This is not what America is about. It is so wrong."
Chief Judge Beryl Howell, the top judge on the US District Court in Washington on which Jackson sits, also weighed in, saying in an unusual public statement that public criticism "is not a factor" in sentencing decisions.
'Little bit betrayed'
In his interview, Cousins said the jury had not discussed politics.
"As a whole group, and in every single conversation that I was involved in or overheard, we never discussed politics as a jury. I have no idea what anyone's political affiliation is," he said.
The jurors have kept in touch and followed developments, Cousins said, adding they all "echo the sense of being appalled. Maybe a little bit betrayed".
Grant Smith, one of Stone's lawyers, said the defence team was examining jurors' social media posts.
Early on in the jury selection process, Jackson overruled Stone's lawyers when they tried to strike prospective jurors who worked for the government or had opinions about Trump.
All 10 Democrats on the Senate Judiciary Committee called for an investigation. Republican chairman Lindsey Graham dismissed that idea.
He wrote on Twitter that he hoped the court would take the jury allegations seriously if the report was accurate, calling it "not fair".
Other Republicans shrugged off the furore.
"I'll leave it up to a judge to decide whether a juror is biased," Senator Chuck Grassley said.
Stone was one of several close Trump associates charged in Mueller's probe, which Trump called a "witch hunt". His supporters are pushing for a presidential pardon. Trump has declined comment.
The Republican-led Senate last week acquitted Trump on impeachment charges brought by the Democratic-led House accusing him of abuse of power and obstruction of Congress stemming from his dealings with Ukraine.