A three-judge panel in Manhattan rejected an appeal by the president's lawyers challenging a subpoena by New York prosecutors that demanded that his accounting firm hand over the records.
The federal judges, however, refused to take a position on claims by Trump's attorneys that as America's leader he is immune from any criminal investigation.
"We emphasize again the narrowness of the issue before us," they wrote in their decision.
"This appeal does not require us to consider whether the president is immune from indictment and prosecution while in office, nor to consider whether the president may lawfully be ordered to produce documents for use in a state criminal proceeding," the judges added.
The president's legal team did not immediately respond to a request for comment but it is likely that the case will end up in the Supreme Court.
Trump had filed suit against Manhattan District Attorney Cyrus Vance Jr, a Democrat who had subpoenaed the accounting firm Mazars USA, seeking access to the president's returns dating back to 2011.
Vance is investigating payments made by Michael Cohen, Trump's former personal attorney, to Stormy Daniels, an adult film actress who claimed to have had a sexual liaison with Trump before he ran for president in 2016.
Cohen is currently serving three years in prison after admitting paying hush money - in violation of campaign finance laws - to Daniels and another woman, tax fraud, and lying to Congress.
Trump's lawyers claimed in court that their client doesn't need to abide by Vance's injunction because as president of the United States he cannot be prosecuted for an offense.
But the judges ruled that presidential immunity was not an issue here because it was the accounting firm that had been subpoenaed for the documents.
Trump broke with a long-established norm during the 2016 presidential election by refusing to release his tax returns as most presidents have done since the 1970s even though it is not required by law.