Dhawan's fluent innings of 114 was backed up by valuable contributions from Rohit Sharma (65) and Ravindra Jadeja (47) as reigning world champions India made 331 for seven after being put in by AB de Villiers in Cardiff.
South Africa's reply, in chase of the highest ODI score recorded at Cardiff Wales Stadium, started at a furious pace, but the removals of De Villiers (70) and Robin Peterson (68) effectively ended their hopes.
They were eventually bowled out for 305 off the last ball of the innings, despite Ryan McLaren's brave 71 not out.
The Proteas lost Colin Ingram (six) and Hashim Amla (22) during a frenetic start to their chase, leaving them 31 for two off just 3.5 overs.
Peterson and De Villiers continued in an aggressive fashion and put together a 50 partnership off just 40 balls as South Africa raced to 77 for two from 10 overs.
The pair both passed 50, but Peterson, having survived one major scare a few minutes earlier, was run out as Jadeja's agile stop once again caught him way out of his ground with the score on 155, ending the 124-run stand with his skipper.
India captain Mahendra Singh Dhoni's tactic of employing spin from both ends with Jadeja (two for 31) and Ravichandran Ashwin soon stymied the flow of runs and dropped the rate below the required figure.
The pressure told as first JP Duminy (14) went lbw to Jadeja - wasting South Africa's sole review in the process - before De Villiers lost his composure to end a fine knock; top-edging as he charged a Umesh Yadav bouncer to give Jadeja a simple catch.
David Miller went moments later without facing as he and Faf du Plessis contrived to produce a farcical run out to make the score 187 for six.
McLaren and Du Plessis attempted a recovery, smashing a 50 partnership off just 28 balls, but when the latter went for 30 - lofting a regulation catch to Suresh Raina off Ishant Sharma (two for 66) - there were still 94 needed with three wickets left, and they came up short.
Earlier in the day, Dhawan had produced a sparkling maiden ODI century after India were put in by De Villiers.
South Africa were without the injured Dale Steyn, and lost Morne Morkel to a quad strain after the seamer had bowled just 6.5 overs of his allocation.
India took full advantage. Sharma and Dhawan moved the score to 100 in the 20th over with relatively few problems and both batsmen reaching their half-centuries a few overs later.
The pair's stand was eventually broken in the 22nd over with the score on 127; Peterson taking the catch off the bowling of McLaren (three for 70) to dismiss Sharma.
Normal service was soon resumed as Dhawan upped the scoring rate, hitting a massive six and a lofted four off Lonwabo Tsotsobe, before reaching his first ODI ton off just 80 balls.
The left-hander should have gone next ball, but De Villiers failed to gather a stumping chance off Duminy (one for 42).
Tsotsobe picked up his first wicket as Amla caught Virat Kohli (31) on the boundary before Dhawan eventually fell, sub fielder Aaron Phangiso taking a simple chance off Duminy's bowling.
Wickets tumbled late in the innings but Jadeja's hitting ensured South Africa had too much to do.