Captain Jos Buttler and Dawid Malan made centuries and dragged England back from 14-3 to post a big total and win the third one-day international against South Africa for a consolation victory.
Fast bowler Jofra Archer, playing in his first international series for two years, took 6-40 and blew through South Africa's top and middle order to carry England to its 59-run win in Kimberley. Archer fittingly finished it off by bowling Tabraiz Shamsi.
South Africa was all out for 287 chasing England's 346-7.
South Africa had already won the series after taking a 2-0 lead and while the victory in the final game of the series was a consolation for England, it had repercussions for South Africa.
ODI World Cup qualification
South Africa is still outside of the automatic qualifying places for the 50-over World Cup in India this year and needs every win it can get. The Proteas have two ODIs left against the Netherlands to clinch automatic qualification. England is already assured of a place at the World Cup.
England built its daunting total in Kimberley through a magnificent partnership of 232 for the fourth wicket between Buttler and Malan.
Opener Malan made 118 off 114 balls and Buttler hit 131 off 127 to turn England's innings around after Jason Roy (1), Ben Duckett (0) and Harry Brook (6) all went cheaply.
From 14-3, England had surged to 246-4 by the time the partnership was broken when Malan miscued a slog high in the air and was caught by wicketkeeper Heinrich Klaasen.
Moeen Ali cracked 41 from 28 at the end to help England to the highest ODI total at Kimberley by some way, surpassing the 304-5 Sri Lanka got in 2012.
With South Africa resting top fast bowlers Kagiso Rabada and Anrich Nortje, Lungi Ngidi put in the best performance with the ball for the Proteas with 4-62.
South Africa wasn't able to maintain the rate needed to win and Archer, who returned for England in the first game of the series after a long absence with elbow and back injuries, made all the meaningful breakthroughs.
He removed Rassie van der Dussen, Aiden Markram, dangerman David Miller and top-scorer Heinrich Klaasen (80) in his six wickets as England won comfortably this time after letting dominant positions slip in the first two games of the series.