Sean Kergan, 31, had been taken from HMP Shotts to University Hospital Wishaw for an X-ray.
He smoked legal highs prior to the journey then threatened guard Michael McSkimming. He told him 'get the cuffs off or I'll slit your throat'.
A struggle saw Mr McSkimming and a colleague prevent Kergan escaping and he was subdued with help from hospital security staff.
Kergan, of Glasgow, appeared at Hamilton Sheriff Court and admitted attempting to escape the ends of justice and assault in November last year.
Kergan was caged for a minimum of 13 years in 2006 after admitting murdering Stephen Daly, 29, in Glasgow.
He was due to be released but has now had two years added to his jail term.
Depute fiscal Vish Kathuria said Kergan had been searched in prison but produced a concealed blade on the day of the incident.
He added: "The locus was University Hospital Wishaw and at the time was busy with patients, visitors and members of staff.
"The accused is a prisoner serving a life sentence for murder in 2006 and I understand it was carried out by punching, stamping and slashing the victim three times with a razor blade.
"He was attending hospital with G4S staff for him to be X-rayed.
"Prior to being taken he was searched and nothing recovered.
"When he was admitted to hospital he was taken to the X-ray department via the rear entrance.
"As he was leaving the hospital he suddenly and without warning, with his left hand produced an unknown implement later known as a razor blade.
"It was produced to the male officer's neck and at the same time he stated 'get the cuffs of I will slit your throat.
"There was an immediate reaction from both staff and there was a struggle where all parties fell to the ground.
"Hospital security staff came to assist before police arrived and he was returned to prison.
"A basic search of the nearby area was carried out and a razor blade was discovered near to the door of the hospital but, unaware of its involvement, that was safely disposed of police and was not kept as evidence.
"The significance only came to light when the accused was spoken to at Shotts and he told them he had had the blade in his cuff."
Umar Hussain, defending, said: "He had been in Barlinnie but had been downgraded to Shotts and there came across a severe addiction to legal highs and had been smoking these legal highs on the day of this offence.
"He disputes that this was a blade he concealed in his top and his position is that it was a blade that he found on the bus to hospital and, in his words, the seed was planted.
"Having found the blade, and coupled with the legal highs, he has no explanation for why he would do this.
"He has let himself and his family down. His co-accused for the murder has now been released back into the community and Mr Kergan was being integrated back into the community before this."
Sheriff Thomas Millar said: "This is a very serious matter and very frightening for the officers involved.
"It is worrying that the weapon used was the same as the one used in the initial offence in the initial offence for which you were imprisoned."
Kergan and fellow thug David Thomson, 31, punched, kicked and slashed their victim to death in 2005 following an argument.
Daly was dragged down an embankment and set on fire. His burnt body was later found by a passer-by.
Kergan was slashed in prison after 'bad blood' boiled over behind bars in 2015.