WASHINGTON—President Trump sought Thursday to distance himself from his longtime fixer and former personal lawyer Michael Cohen, who was sentenced a day earlier for crimes including some that prosecutors said the president directed Mr. Cohen to commit.

In private, Mr. Trump vented about investigators’ scrutiny of him and his associates, people familiar with the matter said, while in an interview with Fox News, the president said Mr. Cohen was more of a public-relations associate than a lawyer, saying he did “low-level work” for him.

Mr. Trump also said that he never directed Mr. Cohen to violate the law, though he didn’t explicitly deny ordering Mr. Cohen to arrange hush-money payments during the campaign—for which Mr. Cohen pleaded guilty to breaking campaign-finance law.

“He was a lawyer and he is supposed to know the law,” Mr. Trump said on Twitter. “It is called ‘advice of counsel,’ and a lawyer has great liability if a mistake is made. That is why they get paid.”

He accused Mr. Cohen, who was sentenced Wednesday to three years in prison, of pleading guilty to the campaign-finance violations to “embarrass the president.”

Mr. Trump’s criticism comes as Mr. Cohen’s guilty pleas have escalated pressure on the president in recent months, implicating him in federal crimes and exposing the depth of his involvement in efforts to close a real-estate deal with Russia while praising Russian President Vladimir Putin on the campaign trail.

The campaign-finance violations to which Mr. Cohen pleaded guilty in August related to payments he arranged during the 2016 presidential campaign to buy the silence of two women who said they had sexual encounters with Mr. Trump.

Last week, federal prosecutors in Manhattan wrote that Mr. Trump, identified in the document as “Individual-1,” directed and coordinated the illegal payments with Mr. Cohen.

The Wall Street Journal first reported a month ago the details of Mr. Trump’s central role in the payments, including that he was involved in or briefed on nearly every step of the agreements.

People close to Mr. Trump say he is worried about prosecutors’ tactics and whether they could target members of his family. The Manhattan U.S. attorney’s office is continuing to investigate the Trump Organization (which is headed by Mr. Trump’s two adult sons).

Michael Cohen, President Trump’s former personal attorney, was sentenced to three years in prison on Wednesday. In court, he said his blind loyalty to President Trump led him “to take a path of darkness.” (Photo: Timothy A. Clary/AFP/Getty Images)

At the same time, people close to the White House described the president as less consumed this week about the investigations than the media coverage of a contentious meeting he had with House Minority Leader Nancy Pelosi (D., Calif.) and Senate Minority Leader Chuck Schumer (D., N.Y.). “He was annoyed with how that meeting was playing out,” one person close to the White House said. Network shows have repeatedly played clips of Mrs. Pelosi correcting the president on how many votes he has in the House and on his characterization of her.

Newt Gingrich, former Republican House speaker, said people around Mr. Trump are worried about the federal investigations into his campaign, business and associates.

Rudy Giuliani, a lawyer for Mr. Trump, described the president as “disappointed” by Mr. Cohen and by federal prosecutors, who Mr. Giuliani said had behaved “improperly.”

“People around him all feel this is a very real concern. These guys play for keeps,” Mr. Gingrich said. Asked if Mr. Trump mentions Mr. Mueller’s investigation in conversations, Mr. Gingrich added: “Sure. Of course he does. How could you not? Imagine if it were your life and it’s on Page One every single day.”

The president told Fox News that in retrospect, it was a “mistake” to hire Mr. Cohen, who he said did a “favor” for him more than a decade ago. Mr. Cohen’s relationship with Mr. Trump had blossomed in 2006, as he rallied to the developer’s side in a dispute with a condo board at Trump World Tower.

Shortly after Mr. Cohen’s sentencing, prosecutors publicly disclosed that American Media Inc., the National Enquirer’s parent company, had also admitted to coordinating with the Trump campaign in making one of those illegal payments. The company said the purpose of its $150,000 payment to a former Playboy model in August 2016 was to quash her story of an affair with Mr. Trump to prevent it from influencing the 2016 election—not for legitimate editorial reasons, as the company previously said.

Mr. Trump told Fox News, “I don’t think we made a payment” to American Media for its purchase of a former Playboy model’s story of an affair with Mr. Trump. A secret recording Mr. Cohen made of a conversation with Mr. Trump in September 2016 shows the two men discussing a plan to buy back the rights to the model’s story from American Media, although they ultimately didn’t.

Mr. Cohen last month also pleaded guilty to lying to Congress about efforts to build a Trump Tower in Moscow during the 2016 campaign, saying he lied to minimize Mr. Trump’s involvement in the deal. In August, he pleaded guilty to five counts of tax fraud.

Mr. Cohen has spent more than 70 hours meeting with special counsel Robert Mueller’s investigators, who are probing whether Trump associates colluded with Russia’s efforts to interfere in the 2016 U.S. election. Mr. Trump has denied collusion, and Moscow has denied election interference. Mr. Mueller has obtained guilty pleas from at least four other Trump associates.

—Joe Palazzolo and Peter Nicholas contributed to this article.

Write to Rebecca Ballhaus at Rebecca.Ballhaus@wsj.com