It is the latest in a series of high-profile departures from President Trump’s team.
There has been speculation that Mr Cohn, a supporter of free trade, was angered by Mr Trump’s plans to impose tariffs on aluminium and steel imports.
In a statement released by the White House, Mr Cohn said it had been “an honour to serve my country”.
The 57-year-old former president of the Goldman Sachs bank had helped Mr Trump push through his sweeping tax reforms late last year.
Why has Mr Cohn gone?
Gary Cohn and President Trump were never believed to be close.
Mr Cohn wasn’t specific about the reasons, saying in a statement it had been “an honour to serve my country and enact pro-growth economic policies to benefit the American people, in particular the passage of historic tax reform”.
Once that mission had been achieved, a number of differences may have prompted the departure, including the possible looming trade tariff war and his differences on that issue with trade adviser Peter Navarro and Commerce Secretary Wilbur Ross.
Mr Cohn had reportedly set up a meeting between Mr Trump and business executives who opposed the tariffs move. But Mr Trump pulled out of that meeting and on Tuesday reportedly asked Mr Cohn in the Oval Office to back the tariffs publicly. Mr Cohn did not answer, sources told Bloomberg.
In August last year, Mr Cohn had also criticised Mr Trump over his reaction to a far-right rally in Charlottesville, Virginia, saying the administration “can and must do better”. He was reported to have drafted a resignation letter after the event.