One of his investment firms, Icahn Enterprises, owns a big stake in an oil refinery business called CVR Energy. And Mr. Icahn has been vocal about environmental regulations. In a front-page article in March, The New York Times detailed how Mr. Icahn had pressed for a change in a requirement that refiners be held responsible for ensuring that corn-based ethanol is mixed into gasoline.
“Following his apparent failure to win a regulatory change on ethanol rules that would benefit his personal empire, Carl Icahn is taking his ball and going home,” Robert Weissman, the president of the nonprofit advocacy group Public Citizen, said Friday.
Earlier this year, several Democratic senators demanded that Mr. Icahn step away from his advisory role because of the potential conflict of interest.
In recent months, Mr. Icahn told at least one close associate that he was frustrated with the scrutiny that the position had cast upon him and his business.
In his letter on Friday, Mr. Icahn said that he “never had access to nonpublic information or profited from my position.” He added that he did not believe his role had created a conflict of interest.
The decision to quit by Mr. Icahn, 81, comes during a week when corporate executives on Mr. Trump’s special advisory board stepped down in the wake of the president’s ambiguous remarks about a rally of white supremacists and right-wing hate groups in Charlottesville, Va.
An outspoken and cantankerous investor, Mr. Icahn has at times shared the spotlight with the president. He endorsed Mr. Trump early in his campaign, and at one point in it, Mr. Trump even openly contemplated naming Mr. Icahn his Treasury secretary.
The morning after Mr. Trump won the election, Mr. Icahn said that he made $1 billion worth of bets in the stock market.
It was never clear exactly what Mr. Icahn’s role as a special adviser was — he did meet at one point with Jay Clayton before Mr. Clayton was approved by the Senate as chairman of the Securities and Exchange Commission.
Reached at home on Friday, Mr. Icahn declined to elaborate on the matter. “I am not going to say anything more,” Mr. Icahn said. “I really can’t talk about this.”