A lawyer whose firm reaped $150 million in taxpayer-funded fees while repping 10,000 Ground Zero workers tried to weasel out of making a $3.8 million donation to the site’s memorial — even though his name is prominently displayed on its Founders Wall, court papers show.

Mass-tort attorneys Marc Bern and Paul Napoli, had promised to donate a total $5 million gift, equivalent to about 3 percent of their fees, the documents say.

The pair initially gave $1.2 million. But then Bern balked at giving the additional $3.8 million, the papers state. He only finally agreed to cough up the rest when the foundation agreed to make his name bigger on the wall, according to his own e-mails.

Then Bern and Napoli decided to part ways and dissolve their law firm — and Bern claimed he never intended to gift the extra funds, documents say.

Now a court referee has ordered Bern to make good on the pair’s pledge.

“For the last several years, Mr. Napoli, Mr. Bern and the legacy Napoli Bern law firm have received the honor and benefit of having their names inscribed and prominently displayed on the 9/11 Memorial Founder’s Wall and gift store,” Manhattan Supreme Court Referee Mark Zauderer wrote in a new ruling.

“It is a benefit they continue to share together, in exchange for a donation they made together — not just for business reasons, but as a small way of giving back in recognition of the more than $150 million net in legal fees that the firm had earned in the 9/11 litigation.”

Bern’s lawyer told the New York Law Journal that his client has always been a strong supporter of the memorial and plans to appeal.