President Trump on Tuesday called on William P. Barr, the attorney general, to take action before Election Day against his Democratic opponent, former Vice President Joseph R. Biden Jr., over his son’s foreign work, an extraordinary attempt to pressure the government’s chief law enforcement to help him politically. The president made the remark during an interview with “Fox & Friends,” after days of caustic criticism of Mr. Biden, the moderators of the presidential debates, the news media and, increasingly, Mr. Barr. He recently said the attorney general would go down in history “as a very sad, sad situation” if he did not indict Democrats like Mr. Biden and former President Barack Obama. “We’ve got to get the attorney general to act,” Mr. Trump said on Tuesday, when asked whether he wants to see investigations into unverified information about Mr. Biden and his son Hunter that the president’s personal lawyer, Rudolph W. Giuliani, claims he recently obtained. Mr. Giuliani, who has made a range of outlandish and false assertions in an effort to damage the president’s rivals and critics, has refused to provide news outlets with the information he claims to have. Mr. Trump called on Mr. Barr to appoint a special prosecutor or similar official, saying: “He’s got to act. And he’s got to act fast.” “This is major corruption, and this has to be known about before the election. And, by the way, we’re doing very well. We’re going to win the election.” A spokesman for Mr. Biden declined to comment. Critics have accused Mr. Barr on a number of occasions of intervening on issues to help Mr. Trump politically. But for the president to publicly call on him to take action against a political opponent was remarkable, especially two weeks before a presidential election. On Monday, Mr. Trump repeatedly called Mr. Biden “a criminal.” “He is sounding desperate,” said Charles Fried, a Harvard Law professor who was solicitor general in the Reagan administration. “He’s been urging the attorney general in several ways to investigate his political opponents and to somehow validate his preposterous charges of criminality.” Keep up with Election 2020 “And even as loyal a henchman as Barr seems to have been able to draw the line somewhere — and it’s driving Trump crazy,” added Mr. Fried. Mr. Trump’s comments come less than a year after he was impeached over another effort to compel an investigation of Mr. Biden and his son by the government of Ukraine in return for American military aid. Asked after his February acquittal by the Republican Senate what lessons he had learned, Mr. Trump responded that Democrats were “crooked” and “vicious” and that he should not have been impeached. The president’s comment about Mr. Barr came during an interview in which he criticized the Bidens, the news media and the infectious disease expert Dr. Anthony S. Fauci, his answers replete with a number of falsehoods. After spending Monday attacking Dr. Fauci, who remains popular in public opinion polls, Mr. Trump claimed on Tuesday that he was “not at odds” with him, before renewing the attacks. The president falsely described Dr. Fauci as a Democrat, and claimed he was a “good friend” of the family of Gov. Andrew M. Cuomo of New York. “He’s been there for a long time, I leave him there, and he’s been wrong,” Mr. Trump said of Dr. Fauci. Updated Oct. 20, 2020, 11:36 p.m. ET He then accused reporters of favoring Dr. Fauci “because they think he’s against me,” and maintained that the doctor was not always a “team player.” Later in the day, before leaving for a rally in Erie, Pa., Mr. Trump abruptly ended an interview with the “60 Minutes” correspondent Lesley Stahl at the White House and then posted a short behind-the-scenes video of her at the taping, noting that she had not been wearing a mask. Mr. Trump ended the interview after becoming irritated with Ms. Stahl’s lines of questioning, according to two people familiar with the circumstances of the taping. The rally in Erie was another attempt to consolidate support in a state that was critical to the president’s success in 2016 but where he has struggled in polls against Mr. Biden. Mr. Trump hammered his Democratic opponent’s energy policies, repeating a false claim that Mr. Biden supports a total ban on fracking, a major industry in the state. In what Mr. Trump said was a first for one of his campaign rallies, he played on large video screens a montage of several clips in which Mr. Biden and his running mate, Senator Kamala Harris of California, talked about phasing out fossil fuels to combat climate change. “If Biden is elected, he will wipe out your energy industry,” the president said. Mr. Trump also offered a litany of false claims about Mr. Biden’s position on the coronavirus, saying that his opponent would “delay therapies, postpone the vaccine, prolong the pandemic.” He insisted that the United State was “rounding the turn on the pandemic,” even though the virus is surging around the country, including in Pennsylvania, where new cases over the past week have run 42 percent higher than the average two weeks earlier, according to a New York Times database — a level the state has not seen since April. Mr. Trump had one other warning for voters there: that Mr. Biden, whom he calls “Sleepy Joe,” would fail to entertain them as he has. “If you want depression, doom and despair, vote for Sleepy Joe,” he said. “And boredom.” Seeming to acknowledge his electoral deficit, the president pined for the days before the coronavirus when his electoral prospects looked at least somewhat brighter. Before “the plague” arrived, he said, “I wasn’t going to Erie. I mean, I have to be honest, there’s no way I was coming. I didn’t have to.” He added, “We had this thing won.” Mr. Trump had been expected to be joined by the first lady, Melania Trump, for her first public appearance since she contracted the coronavirus. But an aide to Mrs. Trump said Tuesday morning that she had a lingering cough and would not accompany her husband.