The Richmond, Virginia-based 4th US Circuit Court of Appeals issued a set of decisions instructing a lower court judge to dismiss the lawsuit filed against the Republican president in June 2017 by the Democratic attorneys general of Maryland and the District of Columbia.
The three-judge panel said the attorneys general lacked legal standing to bring the case.
The court said the District of Columbia and Maryland's interest "in enforcing the Emoluments Clauses is so attenuated and abstract that their prosecution of this case readily provokes the question of whether this action against the President is an appropriate use of the courts, which were created to resolve real cases and controversies."
The decision halts dozens of subpoenas issued to Trump's businesses and government agencies for financial documents related to the hotel.
"Today's pair of decisions by the 4th Circuit Court of Appeals is a complete victory," Jay Sekulow, a lawyer for Trump, said in a statement.
"This latest effort at presidential harassment has been dismissed with prejudice."
"Word just out that I won a big part of the Deep State and Democrat induced Witch Hunt," Trump wrote on Twitter.
Trump also called the lawsuit "ridiculous," adding that he loses a "fortune" by being president.
"The idea that the District of Columbia and Maryland are not harmed by the President's violation of the Constitution is plain error," Maryland Attorney General Brian Frosh and District of Columbia Attorney General Karl Racine said in a joint statement.
"We will continue to pursue our legal options to hold him accountable."
Trump opened the Trump International Hotel, just blocks from the White House, shortly before he was elected in November 2016.
Unlike past presidents, he has retained ownership of numerous business interests, including the hotel, while serving as president.
Since his election, the hotel has become a favored lodging and event space for some foreign and state officials visiting the US capital.
The lawsuit alleges that, in failing to disengage from the hotel, Trump has made himself vulnerable to inducements by foreign governments seeking to curry favor, violating the Constitution.
Maryland-based US District Judge Peter Messitte last year allowed the lawsuit to proceed, a ruling that Trump appealed to the 4th Circuit.
All three of the judges who heard the appeal were appointed by Republican presidents.
Trump still faces a lawsuit making similar claims brought by a group of more than 200 Democratic Party lawmakers.
A judge in Washington has issued key preliminary rulings against Trump, who on Monday asked an appeals court to halt the case.