The decision by appeal judges now opens the way for Alexander Reid, 62, to ask the parole board to free him – something he could not do while still a patient in The State Hospital, Carstairs.
Reid was 17 when he stabbed Angela McCabe, 26, in 1967 at her home in Bishopbriggs as her four-week-old daughter lay upstairs in her crib.
Reid, part of a travelling family who was living in Maryhill, Glasgow, at the time, was accused of murder. But in court his guilty plea to a reduced charge of culpable homicide was accepted.
Judge Lord Walker heard evidence from doctors and sent Reid to The State Hospital "without limit of time".
But during his time in Carstairs doctors came to believe there had been a mistake. In 1967 tests appeared to show Reid was suffering from "a mental disorder" that would today be classed as learning disability.
The Court of Criminal Appeal in Edinburgh heard psychiatrists now labelled Reid's problem as an untreatable dissocial personality disorder.
His legal team successfully argued the new diagnosis amounted to "new evidence" allowing Reid to appeal.
Five appeal judges have now quashed the 1967 decision to send Reid to Carstairs, substituting a life sentence.
Reid long ago completed the 10-year minimum the judges attached to the life sentence, opening the way for him to seek parole. The case was heard after being examined by the Scottish Criminal Cases Review Commission.
Advocate depute Andrew Brown, QC, said the Crown was not opposed to Reid's transfer to prison, as long as he remained locked up.