David Nicholson (31) applauded as his 72-year-old victim was taken to a waiting ambulance with life-threatening injuries following the horrific assault at a bungalow.
Nicholson, who earlier turned up at his victim's home under the influence of drink to borrow money, shouted at Thomas Melling: "You got what you deserved."
He repeatedly punched and kicked Mr Melling, hit him with a microwave and throttled him until he blacked out during the murder bid at Friary Court, Inverkeithing, in Fife, on July 31 last year.
The pensioner suffered multiple broken ribs and bleeding to the brain in a catalogue of injuries and spent 30 days in critical care.
A judge told Nicholson at the High Court in Edinburgh: "This was a violent and sustained attack that you perpetrated on this 72-year-old man in his own home."
Lord Burns said: "You accept this constituted a murderous attack on Mr Melling and it was quite clear from what you said at the time that you intended to kill him and you very nearly succeeded in that."
He added: "It has had profound physical and mental consequences on Mr Melling."
The judge told Nicholson that he would have faced an eight and a half year prison sentence but for his guilty plea.
Lord Burns also ordered that Burns be monitored and supervised for a further three year period.
Nicholson, formerly of Beauly Court, Hallglen, earlier admitted assaulting Mr Melling to his severe injury and danger of life and attempting to murder him.
Advocate depute Eric Robertson said that on the day of the attack Nicholson was drinking Buckfast tonic wine, but appeared angry.
He went to the victim's home and asked for money and was given £10 or £20.
About an hour later he returned and banged on the door. The prosecutor said: "Mr Melling opened his door and saw the accused there."
"The accused immediately punched him on the face and grabbed him by the throat. After this, Mr Melling has little recollection of events as he was in and out of consciousness," said the prosecutor.
A warden at the complex found Mr Melling lying on the floor bleeding heavily from his face with glass from a smashed microwave door on him.
The woman heard Nicholson shouting outside: "He deserves it. I will be back and try again. I want him dead. Hope he dies."
Paramedics were called and when they arrived Nicholson told one of them that he had done it and said it was a long time coming.
Police later detained Nicholson in Inverkeithing with blood on his face and hands.
Defence solicitor advocate Gordon Martin said: He accepts the offence does him no credit and he regrets his involvement in matters."
He said Nicholson, a welder, had faced problems in the family home when he was younger.
The court heard that Mr Melling's relationship with Nicholson's mother ended in 2011 but he still had some contact with his step-son.