Lawyers for President Trump’s charitable foundation pushed back aggressively against the New York State attorney general’s office in court papers on Thursday, calling a lawsuit against the charity a political attack motivated by the former attorney general’s “record of antipathy” against Mr. Trump.

The court papers, filed in State Supreme Court in Manhattan, marked the first formal response by the Donald J. Trump Foundation to a blistering complaint that the attorney general’s office lodged against the charity in June. The lawsuit accused the charity and members of Mr. Trump’s family of sweeping violations of campaign finance laws, self-dealing and illegal coordination with Mr. Trump’s presidential campaign.

One month after the civil suit was filed, state tax officials opened a separate investigation into the foundation.

When the suit was filed, Mr. Trump derided it on Twitter as the work of “sleazy New York Democrats” and the new submission continued that line of attack.