Gary Cohn is walking away from a career at Goldman Sachs to become President Trump's top economic adviser with a stunning $285 million.

Goldman's willingness to give Cohn a chunk of that fortune ahead of schedule is causing unease among ethics experts, who say the huge payout will make him beholden to the Wall Street firm he worked at for 25 years. They say that Cohn should have to recuse himself from Trump administration matters linked to his former firm.

CNNMoney reported earlier this week that Goldman Sachs said Cohn was leaving with more than $100 million. A separate filing by Cohn himself shows that he's actually leaving with around $285 million.

Goldman Sachs (GS) is immediately paying Cohn $65 million in cash in exchange for the stock awards he earned in recent years, the company said in a filing.

That stock would normally be tied up for several years, but Goldman said it accelerated the payout so that Cohn can sever ties with the firm to become director of the National Economic Council in the Trump administration.

Cohn put out a separate filing on Tuesday saying he had taken possession of a total of $220 million in stock from a trust that had been controlled by his family. Goldman lifted restrictions ahead of schedule on $35 million in stock awards and another $23 million in stock as part of this amount too.

That means Cohn is walking away from Goldman with roughly $285 million, minus a portion the firm withheld so that he can pay taxes. All this doesn't include Cohn's 2016 compensation of more than $7 million.

Related: Trump on Dow 20K: 'Now we have to go up, up, up'

Much of Cohn's money was earned after decades of helping to build Goldman Sachs into a Wall Street powerhouse. Technically, Cohn could have sold his unrestricted shares at any time, but senior execs typically don't do that to signal they have confidence in their company.

The real issue for ethics experts is that Goldman allowed Cohn to also receive the stock that would normally be locked up.

"The Goldman Sachs cash and stock payments present a serious ethics issue," said Lawrence Noble, general counsel at the Campaign Legal Center and a CNN contributor.

"This type of payment clearly calls into question whose interests Mr. Cohn will be representing as director of the National Economic Council," Noble said.

Noble believes the payments appear to qualify as "extraordinary payment," under which federal regulations require government officials to recuse themselves. These payments must exceed $10,000 and be made by a company after it became known that an individual was being considered for or had accepted a government position.

Norm Eisen, a fellow at the Brookings Institute who served as President Obama's ethics czar, also raised the question of whether Cohn's Goldman payday comes under an "extraordinary payment."

If so, Eisen said "then Mr. Cohn should be recused from any matters in which Goldman is a party or represents a party for two years."

That requirement is spelled out in federal regulations.

Given that Goldman represents countless clients around the business world, a two-year recusal could impair Cohn's ability to do his job.

Related: Trump's foreign profit plan

It's not clear if the Office of Government Ethics will require Cohn to recuse himself because no ethics agreement has been posted on the agency's website for Cohn.

But Goldman noted in its filing that Cohn "received guidance" from the White House Office of General Counsel, in coordination with the OGE.

"The only reason we accelerated delivery of Mr. Cohn's shares is to allow him to comply with the conflict of interest rules established by the U.S. government," Goldman told CNNMoney in an email.

White House spokeswoman Natalie Strom said that Cohn "followed all necessary rules and regulations" to join the administration and confirmed that he won't receive a salary in his new role.

"President Trump has established an extraordinary group of compliance officials to ensure that every person" in the administration "meets the appropriate ethical standards," Strom said in an email.

To which, Eisen said: "Even if this turns out to be legal, that doesn't mean it's right."