Actor Sharmila Tagore handed him the prize which comes with a cash award of $50,000.
Thayil, whose book is set in a Bombay opium den in the 1970s and 80s, beat formidable competition from Jamil Ahmad, Amitav Ghosh, Tahmima Anam, Mohammed Hanif, Uday Prakash and Jason Grunebaum.
Incidentally, Thayil is being accompanied by a police escort because of the threat to him after Muslim right-wingers objected to his presence at the festival - he had read out excerpts from Salman Rushdie's Satanic Verses at last year's event.
"I regret the trouble it caused to friends. I don't regret reading it," said Thayil who appeared shell-shocked after the win.
"It's wonderful to win this award because it's an Indian prize and because the money is Indian," he said adding that the victory was especially sweet because the book had received almost uniformly bad reviews in India when it was first published.
Thayil revealed that his next book will follow one particular character from Narcopolis but is not a sequel.