While the interview touched on an array of issues, including health care, foreign affairs and politics, the investigation dominated the conversation. He said that as far as he knew, he was not under investigation himself, despite reports that Mr. Mueller is looking at whether the president obstructed justice by firing Mr. Comey.
“I don’t think we’re under investigation,” he said. “I’m not under investigation. For what? I didn’t do anything wrong.”
Describing a newly disclosed informal conversation he had with President Vladimir V. Putin of Russia during a dinner of world leaders in Germany this month, Mr. Trump said they talked for about 15 minutes, mostly about “pleasantries.” But Mr. Trump did say that they talked “about adoption.” Mr. Putin banned American adoptions of Russian children in 2012 after the United States enacted sanctions on Russians accused of human rights abuses, an issue that remains a sore point in relations with Moscow.
Mr. Trump acknowledged that it was “interesting” that adoptions came up since his son, Donald Trump Jr., said that was the topic of a meeting he had with several Russians with ties to the Kremlin during last year’s campaign. Even though emails show that the session had been set up to pass along incriminating information about Hillary Clinton, the president said he did not need such material from Russia about Mrs. Clinton last year because he already had more than enough.
The interview came as the White House was trying to regain momentum after the collapse of health care legislation even while the president’s son, son-in-law and former campaign chairman were being asked to talk with Senate investigators. Relaxed and engaged, the president sat at the Resolute Desk in the Oval Office, with only one aide, Hope Hicks, sitting in on the interview. The session was sandwiched between a White House lunch with Republican senators and an event promoting “Made in America” week.
Over the course of 50 minutes, the often-fiery Mr. Trump demonstrated his more amiable side, joking about holding hands with the president of France and musing about having a military parade down a main avenue in Washington. He took satisfaction that unemployment has fallen and stock markets have risen to record highs on his watch.
At one point, his daughter Ivanka arrived at the doorway with her daughter, Arabella, who ran to her grandfather and gave him a kiss. He greeted the 6-year-old girl as “baby,” then urged her to show the reporters her ability to speak Chinese. She obliged.
But Mr. Trump left little doubt during the interview that the Russia investigation remained a sore point. His pique at Mr. Sessions, in particular, seemed fresh even months after the attorney general’s recusal. Mr. Sessions was the first senator to endorse Mr. Trump’s candidacy and was rewarded with a key cabinet slot, but has been more distant from the president lately.
“Jeff Sessions takes the job, gets into the job, recuses himself, which frankly I think is very unfair to the president,” he added. “How do you take a job and then recuse yourself? If he would have recused himself before the job, I would have said, ‘Thanks, Jeff, but I’m not going to take you.’ It’s extremely unfair — and that’s a mild word — to the president.”
Mr. Trump also faulted Mr. Sessions for his testimony during Senate confirmation hearings when Mr. Sessions said he had not had “communications with the Russians” even though he had met at least twice with Ambassador Sergey I. Kislyak. “Jeff Sessions gave some bad answers,” the president said. “He gave some answers that were simple questions and should have been simple answers, but they weren’t.”
A spokesman for Mr. Sessions declined to comment on Wednesday.
The president added a new allegation against Mr. Comey, whose dismissal has become a central issue for critics who said it amounted to an attempt to obstruct the investigation into Russian meddling in the election and any possible collusion with Mr. Trump’s team.
Mr. Trump recalled that a little more than two weeks before his inauguration, Mr. Comey and other intelligence officials briefed him at Trump Tower on Russian meddling. Mr. Comey afterward pulled Mr. Trump aside and told him about a dossier that had been assembled by a former British spy filled with salacious allegations against the incoming president, including supposed sexual escapades in Moscow. The F.B.I. has not corroborated the most sensational assertions in the dossier.
In the interview, Mr. Trump said he believed Mr. Comey told him about the dossier to implicitly make clear he had something to hold over the president. “In my opinion, he shared it so that I would think he had it out there,” Mr. Trump said. As leverage? “Yeah, I think so,” Mr. Trump said. “In retrospect.”
The president dismissed the assertions in the dossier: “When he brought it to me, I said this is really made-up junk. I didn’t think about any of it. I just thought about, man, this is such a phony deal.”
Mr. Comey declined to comment on Wednesday.
But Mr. Comey and other intelligence officials decided it was best for him to raise the subject with Mr. Trump alone because he was going to remain as F.B.I. director. Mr. Comey testified before Congress that he disclosed the details of the dossier to Mr. Trump because he thought that the news media would soon be publishing details from it and that Mr. Trump had a right to know what information was out there about him. A two-page summary about the dossier was widely reported the week before Mr. Trump’s inauguration, including by The Times.
Mr. Trump rebutted Mr. Comey’s claim that in a one-on-one meeting in the Oval Office on Feb. 14, the president asked him to end the investigation into his former national security adviser, Michael T. Flynn. Mr. Comey testified before Congress that Mr. Trump kicked the vice president, attorney general and several other senior administration officials out of the room before having the discussion with Mr. Comey.
“I don’t remember even talking to him about any of this stuff,” Mr. Trump said. “He said I asked people to go. Look, you look at his testimony. His testimony is loaded up with lies, O.K.?”
He expressed no second thoughts about firing Mr. Comey, saying, “I did a great thing for the American people.”
Mr. Trump was also critical of Mr. Mueller, a former F.B.I. director, reprising some of his past complaints that lawyers in his office contributed money to Mrs. Clinton’s campaign. He noted that he actually interviewed Mr. Mueller to replace Mr. Comey just before his appointment as special counsel.
“He was up here and he wanted the job,” Mr. Trump said. After he was named special counsel, “I said, ‘What the hell is this all about?’ Talk about conflicts. But he was interviewing for the job. There were many other conflicts that I haven’t said, but I will at some point.”
The president also expressed discontent with Deputy Attorney General Rod J. Rosenstein, a former federal prosecutor from Baltimore. When Mr. Sessions recused himself, the president said he was irritated to learn where his deputy was from. “There are very few Republicans in Baltimore, if any,” he said of the predominantly Democratic city.
He complained that Mr. Rosenstein had in effect been on both sides when it came to Mr. Comey. The deputy attorney general recommended Mr. Comey be fired but then appointed Mr. Mueller, who may be investigating whether the dismissal was an obstruction of justice. “Well, that’s a conflict of interest,” Mr. Trump said. “Do you know how many conflicts of interests there are?”
In an interview with Fox News before Mr. Trump’s comments were published, Mr. Rosenstein said he was confident Mr. Mueller could avoid any conflict of interests. “We have a process with the department to take care of that,” he said.
As for Andrew G. McCabe, the acting F.B.I. director, the president suggested that he, too, had a conflict. Mr. McCabe’s wife, Jill McCabe, received nearly $500,000 in 2015 during a losing campaign for the Virginia Senate from a political action committee affiliated with Gov. Terry McAuliffe, who is close friends with Hillary and Bill Clinton.
In his first description of his dinnertime conversation with Mr. Putin at the Group of 20 summit meeting in Hamburg, Germany, Mr. Trump played down its significance. He said his wife, Melania, was seated next to Mr. Putin at the other end of a table filled with world leaders.
“The meal was going toward dessert,” he said. “I went down just to say hello to Melania, and while I was there I said hello to Putin. Really, pleasantries more than anything else. It was not a long conversation, but it was, you know, could be 15 minutes. Just talked about things. Actually, it was very interesting, we talked about adoption.”
He noted the adoption issue came up in the June 2016 meeting between his son and Russian visitors. “I actually talked about Russian adoption with him,” he said, meaning Mr. Putin. “Which is interesting because it was a part of the conversation that Don had in that meeting.”
But the president repeated that he did not know about his son’s meeting at the time and added that he did not need the Russians to provide damaging information about Mrs. Clinton.
“There wasn’t much I could say about Hillary Clinton that was worse than what I was already saying,” he said. “Unless somebody said that she shot somebody in the back, there wasn’t much I could add to my repertoire.”