Sri Lanka were on their way to recording the second highest run chase in one-day history when they began the penultimate over needing 15 to win off the last 12 balls with five wickets in hand.
But pace spearhead Zaheer Khan conceded just four runs and seamer Ashish Nehra gave away seven runs in the final over to seal India's win.
Three wickets fell in the last two overs, including that of Thilina Kandamby (24) and Angelo Mathews (38), as Sri Lanka were restricted to 411-8.
The biggest chase in one-day history was by South Africa, who made 438-9 to defeat Australia at the Wanderers in Johannesburg on March 12, 2006.
Earlier, Virender Sehwag smashed 146 off 102 balls on a ground with shorter boundaries as India surpassed their previous one-day record of 413-5 against Bermuda in the 2007 World Cu