The flagship policy, introduced by the SNP administration at Holyrood, set out to appoint a single point of contact, such as a teacher or health visitor, to look out for the welfare of children under 18.
Ministers have argued the service will act as a safety net to help families and children if they need it while opponents argue the move breaches the human rights of parents.
Five Supreme Court justices, sitting in London on Thursday, allowed an appeal brought by those opposed to the scheme following a hearing in March.
The court ruled that information-sharing provisions proposed under the 2014 Act may result in disproportionate interference with Article 8 rights under the European Convention on Human Rights - the right to a family and private life.
As presently drafted, they risk breaching important regulations protecting privacy and confidentiality, according to the judges.
The Supreme Court has given the Scottish Parliament and Scottish ministers “an opportunity to address the matters raised in the judgment”.
The justices ruled that “in the meantime”, as the “defective provisions” under the 2014 Act “are not within the the legislative competence of the Scottish Parliament, they cannot be brought into force”.
Simon Calvert, spokesman for the No to Named Persons (NO2NP) campaign, said afterwards: “The decision by the judges is a devastating critique of this fatally-flawed flagship legislation. It is holed below the water line. Let us hope it sinks without trace.”
Ministers had planned to roll out the named person scheme across Scotland in just over a month
Mr Calvert said the measures were “intrusive, incomprehensible and illegal”, adding the judgement “blocked” the Scottish Government from implementing them on August 31.
“It must scrap its plan for state snoopers with intrusive data-sharing powers,” he said. “It has to go back to the legislative drawing board if it wants to try again.
“But they would have to come up with a much more limited scheme that actually respects the rights of children and parents. The Big Brother scheme is history.”
He continued: “It’s wonderful news for mums, dads and children all across Scotland who no longer have to worry about this unjustified invasion of their private lives.
“To many of them the named person scheme felt like a legal battering ram to gain access to their homes.
“The court has taken sides with ordinary families and put the Scottish Government back in its place.”
However, Scottish Deputy First Minister John Swinney insisted the campaigners’ bid to scrap the named person scheme had “failed” and said it would be “implemented nationally at the earliest possible date” once changes have been made.
He added: “The Supreme Court has stated that the aim of the legislation, in promoting and safeguarding the well-being of children and young people, is ‘unquestionably legitimate and benign’.
“It makes clear that the principle of providing a named person to support children and families does not breach human rights.
“The court’s ruling requires us to provide greater clarity about the basis on which health visitors, teachers and other professionals supporting families will share and receive information in their named person role.
“We will start work on this immediately so we can make the necessary legislative amendments. The service will be implemented nationally at the earliest possible date.”
He stressed: “Ministers remain absolutely committed to the named person policy, developed over several years in consultation with a wide range of individuals and organisations working across Scotland to support children and families.
“We will work closely with local authorities, health boards and other key public service partners to ensure that those performing the role have the support and guidance they need ahead of implementation.”