Donald Trump is suing the state of New York and the United States Congress in an extraordinary bid to stop his tax returns being released publicly.

In a lawsuit filed in federal court, Mr Trump's attorneys have argued that Democrats in the House of Representatives do not have a "legitimate legislative purpose" to obtain his tax returns.

"We have filed a lawsuit today in our ongoing efforts to end presidential harassment," Mr Trump's lawyer Jay Sekulow said.

Donald Trump is suing the New York attorney-general and Congress to stop his tax returns being released. (AAP)

The lawsuit seeks to stop a law passed in New York state from taking effect.

Those being sued include Congress's House Ways and Means Committee, which is seeking Mr Trump's tax returns, New York Attorney-General Letitia James and New York's Tax Commissioner Michael Schmidt.

The New York tax return law

When Democrats took control of the House of Representatives in January this year, they immediately filed a subpoena for Mr Trump's tax return.

But the Trump-appointed Treasury Secretary Steven Mnuchin outright refused, stating Congress does not have a "legitimate legislative purpose" to do so.

New York Attorney-General Letitia James is being sued by Donald Trump. (AAP)

As a consequence, Democrats hatched a workaround.

The tax returns are also on file in the state of New York, where Mr Trump lived until he was elected president.

And the state of New York passed legislation earlier this year that required any tax return they had to file to be sent to Washington should a congressional committee request it.

Today's lawsuit would seek to stop that taking place.

"New York legislators admitted that the TRUST Act’s purpose was to help the Committee expose the President’s private tax information for political gain; its purpose was their purpose," the lawsuit reads.

"The TRUST Act grew out of a larger campaign in New York to uncover and expose the President’s private financial information in the hopes of damaging him politically."

Why hasn't Trump released his tax returns?

Presidents are not required to disclose their tax returns, but Mr Trump is the first since Gerald Ford to keep his secret.

Presidential candidates typically release their tax returns to the public during their election bids.

Donald Trump is the first president in a generation not to release his tax returns. (AAP)

Joe Biden has released 21 years of tax returns, for example.

Mr Trump refused to, citing legal advice that he should not while he was being audited.

But in 2016, America's tax office released a statement saying "nothing prevents individuals from sharing their own tax information".

What is Trump hiding?

Democrats have been savouring the notion that Donald Trump is hiding details in his tax returns that could bring him undone.

"Why won't he release his tax returns," Hillary Clinton said during the 2016 election.

Donald Trump and Hillary Clinton during a presidential debate. (AAP)

"Maybe he's not as rich as he says he is. Maybe he's not as charitable as he says he is.

"It must be something really important, even terrible, that he’s trying to hide."

Ms Clinton's quote was included in the Trump lawsuit.

Donald Trump's lawsuits cites the political arguments made by Democrats to access his tax returns. (Supplied)

That includes the full extent of his business deals with Russian oligarchs or investors from the Arabian Gulf, a topic he has long been cagey about.

But it would definitely reveal how much Mr Trump is worth, a dollar figure that has been difficult to pin down.

Mr Trump is known for his exaggerations, but his wealth is something he has been particularly hyperbolic about in the past. His refusal to disclose his actual wealth means that even Forbes has to guess in its annual rich list.

And so much of the president's brand is built around his success as a businessman. If he is worth less than he claims, his brand will be tarnished.

The tax returns will also reveal how much he gives to charity, a subject he has also been obtuse about in the past.

In 1996, Donald Trump showed up at a charity event for children with HIV, but did not donate anything. (AAP)

Mr Trump has a long history of bragging of his generosity, but has offered little proof.

In 1996, Mr Trump gatecrashed a charity event for children with HIV, posing for photos for the press, then leaving without donating a penny.

The following year he showed up to a New York public school with a fake cheque for a million dollars, then only donated $US200.

If the tax returns reveal that Mr Trump is a cheapskate or not as rich as he claims, it would be an embarrassment for the president.

But embarrassing the president is not a "legitimate legislative purpose" for Democrats to obtain his tax returns, the lawsuit argues.