Alex Robinson was drowned in the bath two days before Christmas at his home.
Stewart Greene, 65, of Grimoldby, Lincolnshire, said he drowned Alex Robinson in a bath but denies murder.
Dr Philip Joseph told the jury: "In over 30 years, this is one of the most callous killings or murders I have been involved with."
Alex was in Mr Greene's care at his home while his mother - the defendant's daughter - was out last December.
Giving evidence at Lincoln Crown Court, Dr Joseph said his diagnosis of Mr Greene was that he had a psychopathic personality disorder, characterised by a "callous unconcern for the feelings of others" and an "incapacity to experience guilt".
He said Mr Greene would exaggerate his symptoms and engage in manipulative behaviour to get himself into hospital.
But despite his mental condition, Dr Joseph - who has dealt with more than 800 homicide cases - said Mr Greene understood what he was doing and that his ability to form a rational judgement was not impaired.
He told jurors: "Although his judgement was abhorrent, immoral and illegal, it was rational.
When asked if he was surprised Mr Greene had killed Alex, he replied: "Yes - I am surprised."
Earlier in the trial, Timothy Spencer QC, defending, asked Mr Greene whether he had drowned his grandson, to which he replied: "I drowned him in the bath, yes."
He told the court he drowned Alex because he was angry with the nine-year-old's mother.
The trial continues.
A psychiatrist told a murder trial the death of a nine-year-old Lincoln boy was one of the most "callous killings" he had ever seen.