The double killer, who is in his 40s, is in the process of changing his name to start a new life, the court heard.
The man, who was referred to as "C", had killed his ex-girlfriend and her new companion, the court heard.
Anonymity was "necessary" for his reintegration into the community, the judges ruled.
The anonymity issue came about after C, who was released in October, applied for a High Court judicial review of a decision by the home secretary to refuse him unescorted leave in the community.
Stephen Knafler QC, appearing for C, accepted that his crimes were "high up on the scale of horrific".
But he said legal challenges involving mental health patients should be held in private - or at least with the individual's identity protected.
Lady Hale, the court's deputy president, described C's crimes as "horrendous" and said they had caused "incalculable distress to the families of the victims".
But she said that without anonymity there was "a very real risk that the progress he has made during his long years of treatment in hospital would be put in jeopardy and his reintegration in the community, which was an important purpose of his transfer to hospital, will not succeed".
"I would therefore allow this appeal and maintain the anonymity order in place," she said.
She also said the public had a right to know what happened in the courts, and that sensible decisions were being made.
But that "right to know" had to be balanced against the potential harm the disclosure of a patient's identity could cause to the patient "and perhaps also to the hospital, those treating him and other patients".
The court judgement says the Parole Board agreed to the release of the man on life licence in September and had imposed a number of conditions.
One of the conditions was that C continues to have psychiatric treatment.

The 32-year-old St Eunan's clubman won the All-Ireland title with Donegal in 2012 and was in the side which lost to Kerry in last year's decider.
Kavanagh also helped Donegal to three Ulster Championship triumphs and a National League title.
He made his debut against Cork in 2001 and clocked up 132 Donegal appearances.
Kavanagh's last game for Donegal came in the defeat by Kerry in September's All-Ireland final at Croke Park.
The highpoint of the Letterkenny man's career was winning the Sam Maguire Cup two year earlier thanks to victory over Mayo.
Kavanagh, who will continue to play for St Eunan's, has become the first member of that All-Ireland winning squad to retire.
He played 49 championship games for Donegal, starting with his Ulster SFC debut in 2002.
Eamon McGee, Karl Lacey and Mark McHugh have been among the Donegal players to pay tribute to Kavanagh's service to the county.
"Rory Kavanagh was one of the best players I've played with. A true professional on and off the field. Taught me so much," said McHugh on Twitter.
McGee described Kavanagh as "without a doubt one of the best I've played with" while Lacey said the St Eunan's club was "still an unbelievable athlete".

The 30-year-old winger was named player of the season in his first year at The Valley, which included 13 goals.
"It was a no-brainer for me to sign a new contract," Holmes said. "Hopefully we can get promoted this season."
Holmes also produced six assists in his 38 appearances after joining on an initial two-year deal from Northampton Town in June 2016.
A convicted murderer released on parole from a secure psychiatric unit has won his Supreme Court battle to keep his identity secret.
[NEXT_CONCEPT]
Donegal midfielder Rory Kavanagh has announced his retirement from inter-county football because of work and family considerations.
[NEXT_CONCEPT]
Charlton midfielder Ricky Holmes has signed a new three-year deal with the League One side.