The Richmond-based 4th US Circuit Court of Appeals said the ban violates the US Constitution by discriminating on the basis of religion.
On a 9-4 vote, it became the second federal appeals court to rule against the ban, which the US President announced in September.
The US Supreme Court has allowed the ban to go into effect while litigation challenging it continues.
The 4th Circuit ruling went further than the earlier decision by the San Francisco-based 9th US Circuit Court of Appeals, which found the ban violated federal immigration law but did not address the question of whether it violated the Constitution.
The Supreme Court already has said it will consider both issues in deciding the legality of the ban in the coming months.
The justices are due in April to hear arguments over the ban and issue a ruling by the end of June.
The court examined statements made by Mr Trump and other administration officials, as well as the ban itself, and concluded it is “unconstitutionally tainted with animus toward Islam.,” 4th Circuit Chief Judge Roger Gregory wrote in the ruling.
Mr Trump’s ban, the third version he has issued since taking office in January 2017, blocks entry into the United States of most people from Chad, Iran, Libya, Somalia, Syria and Yemen.
He has said the policy is needed to protect the United States from terrorism by Islamic militants.
More about: travelban