Matthew Breetzke, who made 72, and Marco Jansen, with 70, put on a fighting stand of 97 for the sixth wicket to revived the chase after South Africa slipped to 11-3 and then 77-4.
Left-arm wrist spinner Kuldeep Yadav stood out with figures of 4-68 in the high-scoring contest. His double strike to remove Jansen and Breetzke in the space of three balls was the turning point for India who took 1-0 lead in the three-match series.
The 37-year-old Kohli remained the hero with his 83rd ton across the three international formats after he raised his hundred with a boundary off Jansen and lifted his bat to a raucous home crowd.
An Indian fan breached security and raced to the pitch to touch Kohli’s feet before he was dragged away.
Kohli has the most ODI hundreds, with Indian great Sachin Tendulkar second with 49.
The Indian cricket star tops the list of hundreds in a single format with Tendulkar’s count in Tests being 51.