The Trump Organization is accusing the New York State Attorney General’s office of being “unfairly biased” in its case against the Donald J. Trump Foundation.

In a motion filed earlier this week urging the judge to dismiss the case, attorneys for President Trump’s company, which is connected to the charitable foundation, argued that former New York Attorney General Eric Schneiderman was investigating the foundation while soliciting campaign contributions on the promise to oppose Trump and his agenda.

Schneiderman led the investigation until his resignation in May following the publication of domestic abuse allegations against him in The New Yorker. He was replaced by Attorney General Barbara Underwood, who filed the lawsuit in June.

The lawsuit alleges that President Trump and his three eldest children, who served as members of the charity’s board, repeatedly used charitable donations to pay off other financial obligations. The lawsuit seeks to dissolve the foundation and to bar Don Jr., Ivanka and Eric Trump from serving on other charity boards in the future.

Alan Futerfas, an attorney for the Trump Organization, called it “highly improbable” that an investigation into years of charitable work done by the foundation “was the product of three weeks of new leadership under Attorney General Underwood”.

"The bias of an poffice working towards a goal does not disappear in three weeks," Futerfas wrote. "This is clearly demonstrated by a statement of Attorney General Underwood in which she said that she considers her battle with the President "the most important work [she] has ever done."

The New York Attorney General’s office responded to Futerfas’ filing in a statement.

"As our lawsuit detailed, the Trump Foundation functioned as a personal piggy bank to serve Trump’s business and political interests,” a spokesperson for the New York Attorney General said. “We won’t back down from holding President Trump and his associates accountable for their flagrant violations of New York law -- just as we hold accountable anyone else who breaks the law.”

Prosecutors allege that Trump used the foundation “for his benefit to advance his personal, business, and political interest in violation of federal and state law governing charities,” according to a recent court filing. His alleged indiscretions include using the foundation’s money to pay legal settlements, support political campaigns and even purchase of a portrait of himself to hang in one of his hotels.

The president has been vocal in his objections to what he portrayed as a politically motivated campaign, tweeting that “the sleazy New York Democrats, and their now disgraced (and run out of town) A.G. Eric Schneiderman, are doing everything they can to sue me on a foundation that took in $18,800,000 and gave out to charity more money than it took in, $19,200,000.”

Oral arguments on the motion to dismiss are scheduled to begin later this month.

ABC News' Josh Margolin contributed to this report.