US President Donald Trump has agreed to shut down his personal charity, the Trump Foundation.

The New York Attorney General made the announcement accusing the charity of engaging in a "shocking pattern of illegality" to advance Mr Trump’s political and business interests.

State Attorney General Barbara Underwood said the family foundation would be dissolved and its remaining assets distributed to other charities under her supervision.

Ms Underwood accused the Foundation of a "shocking pattern of illegality involving the Trump Foundation -- including unlawful coordination with the Trump presidential campaign, repeated and willful self-dealing, and much more."

"This amounted to the Trump Foundation functioning as little more than a checkbook to serve Mr Trump's business and political interests," she said in a statement.

"This is an important victory for the rule of law, making clear that there is one set of rules for everyone," Ms Underwood added.

The state attorney general filed a lawsuit against the Trump Foundation in June, accusing it of "persistently illegal conduct."

The suit, which will move ahead despite the agreement dissolving the charity, seeks millions of dollars in restitution and penalties.

It also seeks to bar Mr Trump, his sons Eric and Don Jr and daughter Ivanka from serving on the boards of other New York charities.