Lifer Stuart Murdoch lost his temper, burst the officer's lip and knocked out part of a tooth in a terrifying outburst.
The officer had to be taken to hospital for treatment.
A court heard he lashed out after being told to hand over a metal pole.
Murdoch, 31, admitted assaulting Kevin Hill to his severe injury and permanent disfigurement at HMP Shotts on February 25, 2020.
In 2016 he was jailed for life and ordered to serve at least 16 years for stabbing and murdering Anthony Laurie.
The High Court in Edinburgh heard the 25-year-old victim was attacked after going to Murdoch's home in Glenhove Road, Carbrain, to buy drugs.
Jennifer Cunningham, prosecuting, told Hamilton Sheriff Court on Friday that prison staff went to Murdoch's cell to discuss an issue with his medication.
However, they saw the offending item and felt that it could be used by Murdoch in an act of violence.
They addressed this with him, only for the prisoner to take exception to this being mentioned and he then attacked the guard.
She stated: "Mr Hill noted Murdoch had a metal pole in his cell and decided this should be removed.
"The accused became annoyed and tried to kick Mr Hill, but missed. He then punched the officer on the face before being restrained.
"Colleagues noticed Mr Hill was bleeding from the mouth.
"Part of his tooth could be seen on the accused's back.
"The officer was taken to hospital where a wound to his lower lip required five stitches.
"It has left a scar."
Defence agent Ian Moir said Murdoch acted out of frustration because he hadn't received medication he felt was required.
The lawyer added: "He accepts he shouldn't have done this."
Sheriff Ray Small jailed Murdoch for 15 months
He then said this wouldn't be added to Murdoch’s life sentence.