James O'Brien, 53, appeared at Shrewsbury Crown Court after admitting a charge of assault on an emergency worker.
Judge Anthony Lowe heard that the Stoke Heath prisoner, who was convicted of murder at Birmingham Crown Court in 1998, had attacked the guard in January this year.
Holly-Louise Kilby, prosecuting, told the court that O'Brien had spent more than 20 years in prison for murder, but had then been convicted in 2017 of escape from custody and possession of a bladed article.
The court heard that the prison officer victim at Stoke Heath, a Mr Jones, has worked at the prison for 17 and a half years, and was left with bruises and abrasions after the attack – and needed hospital checks and x-rays of his jaw.
Ms Kilby said that the incident had been sparked by O'Brien missing part of his hour of association and socialisation time due to seeking health care.
She said: "When he returned to his wing at 9.50am he had spoken to prison officer Louise Pink to request another socialisation period because he had missed his."
The request was denied and O'Brien was said to have "responded in an aggressive manner".
Officer Jones had recognised the situation developing and then spoke to O'Brien saying he "had been given his answer," and to return to his cell.
As O'Brien walked upstairs to his cell the officer followed him with the prisoner accusing Officer Pink of "just wanting an argument".
He also suggested that Officer Jones thought he was a "hard man", a comment ignored by the officer.
Ms Kilby said that as Officer Jones had followed O'Brien up the stairs the prisoner had turned round and butted him in the face without warning.
The court was told that he then "kept punching" him to the face.
Ms Kilby said: "He attempted to walk backwards but Mr O'Brien continued to walk towards him and continued to land blows on him."
Another officer had come to his aid but the violence continued and O'Brien was said to have tried to bite Officer Jones.
As O'Brien was holding the officer on the floor he said "you're not so big now", then punched him again.
Andrew Molloy, mitigating, said that O'Brien deserved credit for pleading guilty to the offence, had shown remorse and written a letter of apology to Officer Jones.
He said: "He is genuinely sorry for his actions, he does not know frankly what came over him that morning."
"He has been in prison for 20 years and he has no prison record."
Mr Molloy added: "He has undertaken more than 15 courses during his time in prison, attempting to deal with those matters that trigger violent episodes like this."
Sentencing Judge Anthony Lowe said: "I have got to sentence you for what was really quite a nasty attack, and the prison service – not only the prison service – need to know they are going to be protected by the courts, but those serving sentences need to know that in effect a deterrent sentence is imposed, not only so you do not do it again, but that people might think twice if they are getting a bit uppity with people have to look after them."
O'Brien was sentenced to six months in prison – to run concurrently with his current sentence.