The two pages of tax return, revealed by US TV network MSNBC, also showed he wrote off $103m in losses. It gave no details on income sources. The White House said publishing the tax return was against the law.
Mr Trump refused to release his tax returns during the election campaign, breaking with a long-held tradition. He has said he is under audit by tax authorities and that his lawyers advise against releasing tax returns.
The US Inland Revenue Service has a policy not to confirm whether or not individuals are under audit, but says it does not stop anyone from releasing their own returns. His critics have created numerous petitions calling for their full release, including one that gathered over a million signatures.
Correspondents say that, despite the lack of detail in the 2005 documents, the leak is still significant because so little is known about President Trump’s tax affairs and the new information could increase pressure on him to release more.
The two pages show that Mr Trump paid $5.3m in federal income tax and an extra $31m in what is called alternative minimum tax (AMT). AMT was set up nearly 50 years ago to stop the wealthiest people from using deductions and loopholes to avoid paying taxes.
Mr Trump has called for it to be abolished. The $38m bill was an effective tax rate of about 24%, higher than the average American citizen would pay but below the 27.4% averaged by higher-earning taxpayers.
Although leaking federal tax returns is a criminal offence, MSNBC host Rachel Maddow argued that the network was exercising its right to freedom of speech under the First Amendment to the US Constitution to publish information in the public interest. Journalist David Cay Johnston, interviewed on MSNBC, said he had received the documents in the post from an anonymous source.
In a statement issued before the broadcast, the White House said: “You know you are desperate for ratings when you are willing to violate the law to push a story about two pages of tax returns from over a decade ago.”
It said Mr Trump had a responsibility to pay no more tax than was legally required. Every US presidential candidate since 1976 has released their tax returns although there is no legal requirement to do so.
During last year’s election campaign, Democratic candidate Hillary Clinton accused Mr Trump in a head-to-head debate of paying no federal income tax. He responded: “That makes me smart.”
Last October, the New York Times revealed parts of Mr Trump’s 1995 tax returns that showed losses of $916m (£753m). The newspaper said this could have affected his returns for up to 18 subsequent years, allowing him to legally avoid paying federal income taxes. The forms disclosed on Tuesday do not say whether the £103m write-down was connected to the 1995 losses.