Goldman Sachs has rewarded its departing president, Gary D. Cohn, with expedited access to cash and stock payments valued at nearly $300 million, and in doing so has tacitly encouraged another of its executives to accept an influential role in Washington.

Late on Tuesday, Mr. Cohn, director of the National Economic Council advising President Trump, disclosed in a securities filing that he and his family members had received ownership that day of 940,908 shares of Goldman stock — a position valued at nearly $220 million. That award came in addition to a cash payout, announced the same day, amounting to about $65 million, leaving him with a total windfall of about $285 million.

Given that Mr. Cohn, 56, is required to divest his Goldman shares under federal ethics laws, “we took these actions to enable him to comply with the conflict of interest rules, just as we have done for people in the de Blasio administration,” said Jake Siewert, a company spokesman, referring to the office of Mayor Bill de Blasio of New York. Under a standing policy, Mr. Siewert added, Goldman allows departing employees who are entering government service to keep their stock.

In recent weeks, someone familiar with Mr. Cohn’s financial plans said, he made substantial donations to various charities in preparation for his new job, and he is poised to sell at least some of his Goldman shares. He is drawing no salary for his work at the White House, the person added.

A White House spokesman did not immediately respond to a request for comment.

Goldman’s acceleration of its usual curbs on the eligibility of Mr. Cohn’s stock for sale has revived a debate over whether veterans of the firm who enter public service receive special treatment from the firm — or whether the firm receives such treatment from former employees in government.

Some experts on government ethics said Goldman’s treatment of Mr. Cohn smacked of favoritism. “They’re playing a game, and they’re playing a game to make this person feel beholden to Goldman Sachs,” said Richard W. Painter, a professor at the University of Minnesota Law School and the chief White House ethics lawyer during the George W. Bush administration. Mr. Painter was among lawyers who recently sued Mr. Trump, accusing him of violating the Constitution by allowing his hotels and other business operations to accept payments from foreign governments. Mr. Trump called the suit meritless.

“If Goldman Sachs has a contractual right to keep the stock, but they on a case-by-case basis almost always let you keep the stock if you go into government service, then that’s what’s called an extraordinary payment,” Mr. Painter added.

If Mr. Cohn’s exit pay is ultimately defined as an extraordinary payment — typically a payment of more than $10,000 that is in addition to the employer’s existing obligation and at a time when government employment appears possible — he could be barred from participating in matters related to Goldman for two years.

Mr. Cohn, who joined Goldman in 1990 and eventually became its No. 2 executive, was paid well for his 26 years of service, which included traveling the world on client and regulatory matters, serving on the company’s board and handling many of the firm’s day-to-day management issues.

A significant portion of the nearly one million Goldman shares that he and his family now own were already eligible for sale. But a substantial amount of stock, mostly in the form of restricted shares, would normally not have been available to be sold for up to three years, according to Tuesday’s regulatory filings.

In addition, Goldman bought back Mr. Cohn’s stakes in certain private equity funds and hedge funds managed by the firm, according to one filing. Some of the purchases were made at discounted prices because of the difficulty of selling out of the positions.

Goldman’s actions toward Mr. Cohn are part of “a longstanding tradition of encouraging people to give back to their communities when they leave the firm,” Mr. Siewert said, “and that’s an important part of the culture here.”

Indeed, Morgan Stanley, Citigroup and other financial firms have policies similar to Goldman’s. But some shareholders find the practice objectionable.

Last year, an arm of the A.F.L.-C.I.O. filed shareholder proposals at Goldman and four other major publicly traded banks (a sixth proposal was later withdrawn) seeking to end the practice of hastening stock sales by employees departing for government service. The proposals, which have been defeated in previous years, reflect the union group’s concerns that relaxing the vesting policies would encourage important employees to leave their jobs.

“The point of equity compensation is to attract and retain executives,” said Brandon Rees, deputy director of the A.F.L.-C.I.O.’s investment office. “Ultimately, I think it’s in the best interest of companies that their compensation practices be seen as not compromising the objectivity of government officials.”

A version of this article appears in print on , on Page A19 of the New York edition with the headline: Trump Adviser’s $285 Million Exit Pay Questioned as to Possible Goldman Influence. Order Reprints | Today’s Paper | Subscribe