The 5-to-4 decision could limit the government's ability to deport those with criminal records, something that President Donald Trump has identified as a priority.
Justice Elena Kagan wrote that the part of the Immigration and Nationality Act was so "fuzzy" over what constitutes the kind of aggravated felony that requires an immigrant's deportation that it violated the constitutional protection of due process.
She was joined by the court's consistent liberals - Justices Ruth Bader Ginsburg, Stephen G. Breyer and Sonia Sotomayor - as well as Gorsuch, who has just celebrated his first anniversary on the court after being nominated by Trump.
Gorsuch did not join all of Kagan's opinion, but he agreed with the outcome.
"Vague laws invite arbitrary power," Gorsuch wrote in concurring with the majority. He mentioned that before the American Revolution, the crime of treason in English law gave authorities power to go after those whose opinions they disliked.
"Today's vague laws may not be as invidious, but they can invite the exercise of arbitrary power all the same - by leaving the people in the dark about what the law demands and allowing prosecutors and courts to make it up," he wrote.
For the conservative Gorsuch to align with the liberals might seem a surprise, but his vote was in keeping with questions he asked during oral argument in October. And he was in part following in the footsteps of the justice he replaced, the late Antonin Scalia.
In 2015, Scalia wrote the court's decision in Johnson v. United States, which struck down a similarly vague description of violent felony in the Armed Career Criminal Act.
The same standards held, Kagan wrote: "Johnson is a straightforward decision, with equally straightforward application here."
The present case was brought by James Garcia Dimaya, a citizen of the Philippines admitted to the United States as a lawful permanent resident in 1992, when he was 13.
In 2007 and 2009, he was convicted of residential burglary. The Department of Homeland Security determined that his crimes could be considered crimes of violence and thus were aggravated felonies that made him eligible for deportation.
But after the Johnson decision, lawyers for those slated for deportation challenged a catchall provision of the immigration law. It defined as a crime of violence offenses that involve "a substantial risk that physical force against the person or property of another may be used in the course of committing the offense."
The U.S. Court of Appeals for the 9th Circuit said deciding whether Dimaya's burglaries fit that description required the kind of speculation that Scalia's ruling in Johnson said was improper.
"The Supreme Court delivered a resounding message today: You can't banish a person from his home and family without clear lines, announced up front," said Dimaya's lawyer in the case, Josh Rosenkranz. "This decision is of enormous consequence, striking down a flawed law that applies in a vast range of criminal and immigration cases and which has resulted in many thousands of immigrants being deported for decades in violation of their due process rights."
Chief Justice John Roberts Jr. wrote in dissent that the court was careful to be narrow in the Johnson decision, and that it does not compel striking down a separate law.
"Today's holding invalidates a provision of the Immigration and Nationality Act . . . on which the government relies to 'ensure that dangerous criminal aliens are removed from the United States,'" Roberts wrote, quoting a brief from the solicitor general. He noted that the government deemed the definition "critical" for numerous immigration provisions.
The Obama administration had interpreted the law the same as the current administration.
Roberts was joined by Justices Anthony Kennedy, Clarence Thomas and Samuel Alito.
The lineup of justices in the case produced what is believed to be a first: the chance for Ginsburg to choose who would write the court's opinion.
Under the court's rules, the chief justice decides who writes the opinion when he is in the majority. If he is not, the choice is made by the longest-serving justice in the majority. Although the liberal Ginsburg has been on the court for almost 25 years, this is the first time she has been in that senior position.
The case is Sessions v. Dimaya.