President Barack Obama said he was pleased three challenges were upheld.
President Obama and his Republican rival Mitt Romney are each battling for Hispanic votes ahead of November's presidential election.
Mr Romney reacted quickly to the court's ruling, criticising Mr Obama for not passing a national immigration reform law.
In a statement, he said each US state has "the duty - and the right - to secure our borders and preserve the rule of law".
President Barack Obama later said he was "pleased" that some parts of the law had been thrown out by the court.
But he added: "I remain concerned about the practical impact of the remaining provision of the Arizona law that requires local law enforcement officials to check the immigration status of anyone they even suspect to be here illegally.
"No American should ever live under a cloud of suspicion just because of what they look like."
The Supreme Court judgement came after the US government argued that the law infringed on federal rights to oversee immigration policy.