The court ruled 6-3 that Congress overstepped its bounds when it approved the law in 2002. It would have forced the State Department to alter its long-standing policy of not listing Israel as the birthplace for Jerusalem-born Americans.
The policy is part of the government's refusal to recognise any nation's sovereignty over Jerusalem, until Israelis and Palestinians resolve its status through negotiations.
"Recognition is a matter on which the nation must speak with one voice. That voice is the president's," Kennedy wrote.
The ruling ends a 12-year-old lawsuit by a Jerusalem-born American, Menachem Zivotofsky, and his US citizen parents.
More From This Section
Justice Antonin Scalia read a summary of his dissent from the bench, saying the US Constitution "divides responsibility for foreign affairs between Congress and the president." Chief Justice John Roberts and Justice Samuel Alito joined the dissent.
The court's consideration of the case has coincided with acute Palestinian-Israeli tension over Jerusalem and strain in Israeli-American relations highlighted by Israeli Prime Minister Benjamin Netanyahu's criticism of the US role in international negotiations with Iran over its nuclear programme.
For his part, President Barack Obama has said he remains unconvinced by Netanyahu's efforts to clarify pre-election statements rejecting creation of a Palestinian state.
The status of Jerusalem has for decades been among the most vexing issues in Israeli-Palestinian relations. Israel has controlled all of Jerusalem since the Six-Day War in 1967 and has proclaimed a united Jerusalem as its eternal capital.
US policy has long refrained from recognising any nation's sovereignty over Jerusalem and has held that the city's status should be resolved through negotiations between the parties.
Congress has for years tried to push administrations of both parties to recognise Jerusalem as Israel's capital. The US has never enforced the passport law, on the books since 2002.