It’s long been clear that Donald Trump’s family foundation, the Trump Foundation, is not a generous and ethical charity, but just another of his grifts. He branded it the way he brands his buildings, using his name to generate income that he then has used largely for his own benefit. In 2016, The Washington Post reported that many of Mr. Trump’s boasts about his charitable giving could not be verified. Those that could be were often gifts to himself.

For instance, the largest reported donation the foundation has made — $264,631 — was used to refurbish the fountain in front of Mr. Trump’s Plaza Hotel in New York. He has not given any of his own supposed fortune to the foundation since 2008, relying instead on the beneficence of others, whether pro-wrestling mavens or simply Americans who thought they were supporting, say, veterans. And yet the Trump Foundation was repeatedly compared with the Clinton Foundation, which, despite justifiable concern about Bill and Hillary Clinton’s dual roles as philanthropic boosters and politicians, is a credible charitable enterprise that focuses on global health and has saved perhaps millions of lives.

A lawsuit filed by the New York State attorney general, Barbara Underwood, on Thursday morning confirms many of these facts and adds a few new ones, alleging that “the Trump Foundation was little more than a checkbook for payments from Mr. Trump or his businesses to nonprofits, regardless of their purpose or legality,” Ms. Underwood said in a statement.

In precise and damning detail, the suit catalogs Mr. Trump’s repeated violation of both state and federal laws by tapping the foundation’s funds for his own personal purposes, including paying out legal settlements, making political contributions and purchasing a portrait of himself to hang in one of his golf clubs.