Security guard Robert Nababan encountered the snake on a palm oil plantation road in Sumatra's Batang Gansal district on Saturday.
Mr Nababan tried to catch the python, reports say, which was 7.8m (26ft) long.
It attacked him, and man and reptile fought until Mr Nababan killed it with the help of some villagers.
The guard survived with serious injuries.
The python was not as lucky as Mr Nababan - its body was strung up for display at a village, before it was chopped up, fried and eaten.