Donald J. Trump’s former campaign manager, Corey Lewandowski, resigned on Friday from his role as a CNN political commentator, ending a television deal that had attracted scrutiny and harsh criticism about the cable channel’s journalistic ethics.

Mr. Lewandowski, who joined CNN as a paid contributor days after being fired by Mr. Trump in June, has expressed interest in a senior adviser role in the White House, according to a person briefed on discussions within the Trump transition team.

His name has also been mentioned as a potential chairman of the Republican National Committee, this person said. Mr. Lewandowski has been frequently spotted this week at Trump Tower in Manhattan, chatting with senior aides and attending meetings.

Even as he defended Mr. Trump in front of millions of viewers on CNN talk shows, Mr. Lewandowski stayed in regular contact with the candidate and flew on the Trump campaign jet. He also received tens of thousands of dollars in severance from the Trump campaign, payments that were set to continue through the end of the year.