The Virginia-based court said the president's broad immigration power was "not absolute" and the ban "intended to bar Muslims from this country".
The decision upheld a lower Maryland court ruling that found the ban violated constitutional rights.
The justice department said it would now seek a Supreme Court review of the appeals verdict.
Attorney General Jeff Sessions said the verdict thwarted Mr Trump's effort to protect US national security.
Mr Trump's revised executive order would have placed a temporary ban on people from six mainly Muslim countries and the refugee programme.
The US government argues federal immigration laws grant the president broad powers to stop foreigners from entering the country.
But Chief Judge Roger L Gregory, who wrote the majority opinion for the Fourth Circuit Court of Appeals, said on Thursday that Mr Trump's powers had limits.
"It cannot go unchecked when, as here, the president wields it through an executive edict that stands to cause irreparable harm to individuals across this nation," said Judge Gregory.
The court added that the government's national security argument was a "secondary justification for an executive order rooted in religious animus and intended to bar Muslims from this country".
The decision means citizens from Iran, Sudan, Somalia, Yemen, Syria and Libya can continue travelling to the US.
The 10-3 ruling is the latest in a series of legal setbacks for an order the president insists is needed to stop terrorists from entering the country.
Two lower court rulings blocked the ban just hours before it was due to begin in March.
A Maryland judge ruled that the order was meant to be a ban on Muslims and violated the first amendment of the US constitution.
A federal judge in Hawaii also sided with opponents that the ban was discriminatory and cited "questionable evidence" in the government's argument that the ban was a matter of national security.
The justice department has appealed against the Hawaii decision to the Ninth Circuit Court of Appeals, which heard oral arguments for the case on 15 May.
The Ninth Circuit is the same court that refused to lift a block on Mr Trump's initial travel ban signed on 27 January.
That order took effect for seven days before a federal judge in Seattle halted it.
Instead of appealing against the decision to the Supreme Court, Mr Trump issued a revised version on 6 March.
Washington Attorney General Bob Ferguson issued a statement after Thursday's ruling calling it an "important victory for the rule of law".
"I will support challenges to this illegal and unconstitutional executive order as our own case against the travel ban continues in federal court here in Washington."
Mr Sessions said in a statement that Mr Trump was abiding by the US constitution and was doing his "duty to protect our communities from terrorism".
"This Department of Justice will continue to vigorously defend the power and duty of the Executive Branch to protect the people of this country from danger", he added.
The controversial ban has prompted protests and debate across the US.
More recently, a North Carolina group of pastors highlighted the issue on a billboard citing the 9/11 attacks in Catawba County.
The sign, paid for by the North Carolina Pastors Network, reads: "19 Muslim immigrants killed 2977 Americans", referring to the 9/11 attacks.
A US federal appeals court has refused to lift a temporary block on President Donald Trump's revised travel ban.