Security guard Robert Nababan crossed paths with the giant creature while patrolling an oil palm plantation in the remote Batang Gansal subdistrict of Sumatra island on Saturday.
"The python was 7.8 metres long (25.6 feet), it was unbelievably huge," local police chief Sutarja, who like many Indonesians only has one name, told AFP.
Sutarja said the 37-year-old Nababan, who sometimes liked to eat snake, tried to catch the giant python and stuff it in a gunny sack.
Nababan was then rushed to a hospital in a neighbouring town for treatment.
More From This Section
The police chief said the intervention of another security guard and several local residents, one of whom hit the snake with a log, helped to save the man's life.
Hungry locals later killed the snake and displayed its body in the village before dicing it up, frying it and feasting on it.
Giant python, which regularly top 20 feet in length, are commonly found in Indonesia and the Philippines.