US District Judge Derrick Watson cited "questionable evidence" in the government's argument that the ban was a matter of national security.
President Trump described the ruling as "unprecedented judicial overreach".
The order would have placed a 90-day ban on people from six mainly Muslim nations and a 120-day ban on refugees.
Mr Trump insists the move is to stop terrorists from entering the US but critics say it is discriminatory.
An earlier version of the order, issued in late January, sparked confusion and protests, and was blocked by a judge in Seattle.