Berlin regional court convicted the 44-year-old unemployed defendant of grievous bodily harm resulting in death after an erotic game with his friend went horribly wrong.
The convicted man, who was not identified, met the dead man, who worked in a bank, on the internet. On January 5, he tied the man to his bed and with his consent taped his mouth and nose shut.
After realising the 37-year-old had died, he dismembered him and cooked his arms and head.
Police found the body parts when they arrived at the flat a couple of weeks later. The man answered the door covered in blood after a suicide attempt and told them he had killed his friend.
Judge Peter Faust said both men had a fetish for sadomasochistic sex and that the defendant had no murder motive as the two men "liked each other".
Faust noted that the two had had similar sex just days beforehand, during which the man who later died had lost consciousness. The defendant also said he had had similar encounters with several other partners.
Faust handed down a jail term of three years and three months after the trial, at which the defendant did not testify. Prosecutors had called for a life sentence.