Alan Massie entered William Yule's house to steal his car keys, but was confronted by the pensioner. Dr Yule fought back before being stabbed in the neck, which punctured his jugular vein.
At the High Court in Edinburgh, judge Lord Fairley told Massie the attack showed "a level of evil that is almost beyond comprehension".
The court was told that Massie was on bail at the time and had already entered two other nearby houses with intent to steal in the hours before the murder.
Advocate depute Graeme Jessop said Massie had entered Dr Yule's house at about 11.24am on December 6. He said that Dr Yule's community alarm had issued an alert. The operator had spoken to a man who claimed he was Dr Yule's grandson and the alarm had been triggered by mistake. The call had continued to record and groaning and banging were heard in the background.
Mr Jessop said that about 1pm a cleaner had seen Massie in Dr Yule's driveway, and he had claimed to be his grandson, which she knew was false. The cleaner subsequently discovered Dr Yule's body in his ransacked kitchen, and called 999.
A post-mortem examination showed that Dr Yule had been stabbed four times, once in the neck.
His hands showed signs of defensive injuries, indicating he had struggled with Massie.
Massie later told police: "Wait 'til you see the pictures of the guy I just killed, it's not a pretty sight."
Mark Stewart KC, defending, said: "There is nothing that can be said that offers any explanation for what he has done or provides any comfort to the family. He apologises, for what it's worth."
Lord Fairley told Massie the attack was "as brutal as it was cowardly."
He added: "The level of evil of your actions is almost beyond comprehension. Your incarceration will make a substantial improvement to our society."
Dr Yule grew up in Moray and worked as a doctor in the Royal Navy before working for a short time on Shetland, moving to Forfar in 1968.
He served as a GP until his retiral in 1992.
Dr Yule went on to become an author, publishing two books. He also wrote a number of research papers and was published by the Lancet and other medical journals.