The deportations took place with reference to the so-called Alien Enemies Act (AEA) of 1798, and the deported men were alleged to be gang members by the Trump administration.
Trump declared in March that the Venezuelan gang Tren de Aragua had invaded the USA and therefore could be covered by the law.
The court had previously temporarily halted the deportations.
The Supreme Court focuses on ensuring that people have the opportunity to contest their removal from the USA, without determining whether Trump's invocation of the law was correct.
In a written statement, the Supreme Court notes that it recognizes national security interests, but that these must take into account the Constitution. At least three federal judges believe that Trump has used the law.
The Supreme Court does not oppose other ways that the government uses to deport people from the country, it also emerged from Friday's verdict.
Donald Trump directs harsh criticism against the decision and says it is a "bad and dangerous day" for the USA.
"The USA's Supreme Court does not allow me to do what I was elected to", he writes in a post on Truth Social.