In its ruling, the court said the USA government had not offered any evidence of national security concerns that justified banning seven countries.
Trump issued an executive order on January 27, barring travelers from Iraq, Syria, Iran, Libya, Somalia, Sudan and Yemen from entering the United States for 90 days and all refugees from entering the country for 120 days.
Mr Trump's executive order had been temporarily suspended nationwide by Judge James Robart in Seattle last week.
The appeals court opinion was written by Judge Michelle Taryn Friedland, appointed by President Barack Obama; Judge Richard Clifton, appointed by President George W. Bush; and Judge William Canby Jr., appointed by President Jimmy Carter.
Trump indicated he would appeal the ruling in an all-caps tweet.
A joke doing the rounds after the United States President Donald J Trump took office was - "People generally turn against the leaders for not doing as they promised while asking for votes".
Trump on January 27 signed an executive order stopping all admissions of refugees into the United States and immigration from seven majority-Muslim countries, causing chaos at airports worldwide. But it did not shy away from the larger constitutional questions raised by the order.
The ban itself was set to expire in 90 days, which means that it could technically expire before the Supreme Court has a chance to make a ruling on it.
"The hearing on the preliminary injunction (on Friday) will be one of the most significant developments in any case in the country challenging the suit because it will be the most in-depth examination of the merits of the arguments against the ban", Michael Kelly, a spokesperson for Virginia attorney general's office, said in a statement. They include letting the ruling stand, asking the appeals court to rehear the case or seeking Supreme Court review.
Since the restraining order went into effect, scores of travelers have successfully entered the US from the banned countries. "On the other, the public also has an interest in free flow of travel, in avoiding separation of families, and in freedom from discrimination". The Justice Department is nearly certain to appeal, and the case is likely to make its way to the U.S. Supreme Court, though the appeals process could take over a year to get there.