A prisoner who poured a flask full of boiling water on a prison guard claimed he was forced to carry out the attack by other inmates.
Stephen Shears, 28, attacked the guard from behind in the HMP Peterborough staff room at 08:30 BST on 13 June.
Shears poured the water on the officer's head and neck, causing burns which required hospital treatment, Cambridgeshire Police said.
He was sentenced to a further 10 months imprisonment for the attack.
Shears admitted causing actual bodily harm and was sentenced at Peterborough Crown Court on Tuesday.
After the attack, Shears was detained by other officers and claimed he would have been targeted if he had not carried it out.
Det Con Graham Holmes said: "This was an unprovoked attack that has understandably left the victim shaken.
"Prison officers work hard day-in-day-out to keep order and protect inmates. They do not deserve to face violence of any level and I hope this sentence serves as a deterrent for other inmates considering violent actions."