The Attorney General is also seeking to bar the president and three of his adult children, Donald Jr, Eric and Ivanka, from serving on the board of any New York-based charity, “in light of misconduct and total lack of oversight”.

The President hit back at the lawsuit on Twitter, saying that “sleazy New York Democrats” were “doing everything they can to sue me”. He vowed he would not settle the case.

The lawsuit alleges that the foundation paid $100,000 (£75,000) to settle legal claims against Trump’s Mar-A-Lago resort, $158,000 to settle claims against one of his golf clubs, and $10,000 to purchase a painting of Trump to hang at another of his golf clubs.

The purchase of the painting was an example of one of “at least five self-dealing transactions” which violate tax regulations on non-profit charities, the statement said.

“As our investigation reveals, the Trump Foundation was little more than a cheque book for payments from Mr Trump or his businesses to nonprofits, regardless of their purpose of legality,” Underwood said. “This is not how private foundations should function.”

The Trump Foundation issued a statement denying the charges and accusing the attorney general of holding its $1.7 million in remaining funds “hostage for political gain”.

The lawsuit announced on Thursday was the culmination of a two-year investigation, which began under the previous New York Attorney General, Eric Schneiderman, Underwood said.

Schneiderman resigned last month after several former girlfriends accused him of physical abuse.

New York is also seeking $2.8 million of restitution, a 10-year ban on Trump serving as a director of a non-profit in the state, and similar one-year bans for his children Donald Jr, Eric, and Ivanka, who serve on the foundation’s board.

Eric Trump distanced himself from his own charitable foundation after the election, the New York Times reported, after it came under investigation by the attorney general for allegedly shifting its resources to the Trump Organization.

The Trump Foundation lawsuit adds to Trump’s legal challenges, which include a wide-ranging special counsel investigation into alleged ties between the Trump campaign and Russia. Special Counsel Robert Mueller has indicted several of Trump’s associates and raided the home and office of the president’s long-time lawyer and fixer, Michael Cohen.