Chasing a competitive 252, India were struggling at 60/3 at one point of time. But Kohli, in his best form, rescued his side and partnered well along with southpaw Suresh Raina to snatch a fantastic win from the hosts with seven overs to spare, giving visitors unassailable 3-1 lead in the series.
Kohli made an unbeaten 128 while Raina remained not out after scoring 58. Earlier, part-timer Manoj Tiwary grabbed four wickets to help India restrict Sri Lanka to a moderate total of 251.
The leg-spinner, playing his first match of the series, finished with 4-61 off 10 overs to boost his team's hopes of clinching the five-match series.
Opener Upul Tharanga (51), Lahiru Thirimanne (47) and Tillakaratne Dilshan (42) were the main scorers for Sri Lanka, who were comfortably placed at 152-2 in the 32nd over.
Indian off-spinner Ravichandran Ashwin took two wickets and part-time spinner Virender Sehwag one in the day-night match.
Sri Lanka made an impressive start after electing to bat, with Tharanga and Dilshan adding 91 for the opening wicket.
Fast bowler Ashok Dinda broke the stand when he removed Dilshan, who was caught behind after cracking seven fours in his 48-ball knock.
Tharanga, who pulled Dinda for the first six of the match, fell soon after completing his half-century, stumped by skipper Mahendra Singh Dhoni off Ashwin. He also hit four boundaries in his 73-ball knock.
Dinesh Chandimal (28) and Thirimanne put on 50 for the third wicket before Tiwary struck in his opening over, having Chandimal caught by Irfan Pathan at square-leg.
Off-spinner Sehwag got a big wicket when he had skipper Mahela Jayawardene caught behind for three to reduce Sri Lanka to 155-4.
Sri Lanka made two changes from the side which lost the last match by five wickets, bringing in Thirimanne and debutant paceman Nuwan Pradeep in place of injured Kumar Sangakkara and Isuru Udana.
India replaced leg-spinner Rahul Sharma with Tiwary.