Security guard Robert Nababan encountered the snake on a palm oil plantation road in Sumatra's Batang Gansal district, reports the BBC.
Nababan tried to catch the python, which according to local media reports was 7.8 metres long.
It attacked him. Nababan and the reptile fought until he killed it with the help of some villagers.
The guard survived with serious injuries.
The python's body was then strung up for display at the village, before it was chopped up, fried and eaten.
A police official told the BBC that Nababan's hand was badly injured and that doctors "might have to cut it off".
He said giant pythons and was not surprised that the python was eaten.
"I have heard from friends that they are really tasty. I mean it's a 7 metre snake... That's a lot of meat!"