In an email, Mr. Penn played down the significance of the visit. “I tagged along with my friend Andrew Stein at his request to one of his meetings, and for the first time to meet the president,” he said. “I have had hundreds of meetings with presidents and I don’t relay their conversations, but this was a cordial meeting and no advice was given or taken — but old-time politics was discussed.”

Mr. Penn added, “Despite my misgivings about the Mueller investigation, let me be clear as a lifelong Democrat under no circumstances would I work paid or unpaid for President Trump nor was this meeting about that in any way.”

Reached late Friday night, however, Mr. Stein said he invited Mr. Penn to the meeting specifically to discuss polls with Mr. Trump.

Mr. Penn was one of three advisers who helped Mr. Clinton navigate toward the political center when he battling a newly empowered Republican majority in Congress led by Newt Gingrich, then the House speaker. He stuck with the Clintons longer than some of Mr. Clinton’s other political gurus, like Dick Morris and Douglas E. Schoen, who became highly vocal Clinton antagonists. Mr. Penn also helped Mrs. Clinton win a New York Senate seat in 2000.

But his fallout with the onetime reigning brand in Democratic politics began during Mrs. Clinton’s 2008 presidential campaign, where he clashed with other advisers and was ultimately removed as the chief strategist. Over the past year, like Mr. Schoen and Mr. Morris, he too has won praise on the other side of the political spectrum as he has become seen as a heretic on the left.

Mr. Penn has been praised internally at the White House, and by the president himself, for his fulsome attacks on the special counsel, Robert S. Mueller III. In his appearances on Fox News — he last appeared on MSNBC in September 2017 — and in his opinion pieces in the conservative-leaning opinions pages of The Hill, Mr. Penn has accused Mr. Mueller of overreaching in his investigation.

But an actual sit-down meeting with the president in the Oval Office was, for some former colleagues of Mr. Penn, the inevitable outcome of what they see as his rightward lurch. “Some people are loyal to Republican red, some people to Democratic blue and some capitalism green,” said Philippe Reines, a longtime aide to Mrs. Clinton, who served as her gatekeeper in the Senate and at the State Department.