Mitchell Harrison, 23, originally of Wolverhampton, was serving an indefinite term for child rape in Cumbria when he was killed in October.
Michael Parr, 32, and Nathan Mann, 23, cut his neck with a scalpel made from plastic cutlery and a razor blade.
Newcastle Crown Court heard they cut the dead victim's stomach and planned to eat his liver, but did not do so.
Parr had earlier pleaded guilty to murder and must serve a minimum term of 32 years. He was already serving life for the attempted murder of a hospital patient.
Mann pleaded guilty to manslaughter on the grounds of diminished responsibility and was sentenced to life with a minimum term of 16 years, to run consecutively to the 24-year minimum sentence he is already serving for a double murder.
Harrison was jailed in January 2010 after he admitted raping a 13-year-old girl in Kendal, Cumbria.
He was killed in his cell at the category A facility, which has housed some of the UK's most high profile and dangerous inmates.
The court heard that Mann and Parr had expressed "fantasies" about beheading other prisoners and cutting out their stomachs.
Mann was described by a psychiatrist as "a remorseless, callous psychopath" who harboured "cannibalistic urges" and was "one of the most dangerous men in the criminal justice system".
Sentencing the pair for the "ghastly and gruesome" killing, Judge Justice Openshaw said: "I can't envisage circumstances in which either of them will ever be released.
"They will face the fact that they may well end their lives in prison."