England took the three-match series 2-1 but this was a morale-boosting success for the Proteas.
Kagiso Rabada sparked a dramatic England collapse as South Africa won by seven wickets to record a consolation win in the third one-day international at Lord's on Monday.
England slumped to 20 for six -- the first time in an ODI that six wickets had gone down in the first five overs of an innings -- after losing the toss.
Jonny Bairstow's fine fifty helped England recover to 153 all out.
But it never looked like being enough and South Africa finished on 156 for three, JP Duminy sealing victory with a four off David Willey.
England took the three-match series 2-1 but this was a morale-boosting success for the Proteas ahead of this week's start of the Champions Trophy -- a tournament featuring the world's top eight ODI nations.
Fast bowler Rabada took four wickets for 12 runs in his first three overs on his way to four for 39 in nine.
New ball colleague Wayne Parnell took three for 43 in eight.
Bairstow apart, the only other England batsmen to make double figures were Willey (26) and number nine Toby Roland- Jones, who made an impressive 37 not out on his ODI debut, in a match played on the paceman's Middlesex home ground.
Hashim Amla (55) and Quinton de Kock (34) put on 95 for the first wicket but both openers fell on that total.
Amla became Roland-Jones's first ODI wicket when he bottom-edged a pull onto his stumps and, three balls later, de Kock was yorked by Jake Ball.
But Duminy (28 not out) and South Africa captain AB de Villiers (27 not out) completed a win in a match where only 60 overs out of a scheduled 100 were bowled.
The consolation for England was their inept batting display had come before the Champions Trophy, which they launch across London with a match against Bangladesh at The Oval on Thursday.
An overcast morning and a green-tinged pitch meant it was no surprise when de Villiers opted to field first upon winning the toss.
"The stats show there's something in it for the first 15 overs, and that's when we want to do some damage," said de Villiers at the toss.
As it turned out, South Africa only needed five overs to have England six down.
Rabada struck with just the fifth ball of the match when Jason Roy edged a good length ball to Amla at first slip.
Next over, Joe Root (two) was lbw to a swinging delivery from left-armer Parnell
England then lost their next two wickets on 15.
Eoin Morgan, the England captain, fell for eight on his Middlesex home ground, was caught behind off Parnell.
That was the end of the fourth over and next ball Alex Hales, trying to drive Rabada, got an outside edge to Amla and England were 15 for four.
It was the start of a brilliant over that yielded three wickets in five balls for Rabada.
His fifth ball that over saw Jos Buttler, going for a big drive, well caught by Faf du Plessis at second slip.
Next ball, England's 20 for five became 20 for six when Adil Rashid, even more recklessly, attempted a huge drive and edged to du Plessis for a golden duck.
England Test wicket-keeper Bairstow, recalled for this match, pressed his claims for a Champions Trophy place, with a 67-ball innings featuring eight fours.
He showed his class by cover-driving Rabada and cutting fast bowler Morne Morkel for well-struck boundaries.
But he gave his wicket away when he charged at left- arm spinner Keshav Maharaj only to be stumped by de Kock.
Roland-Jones struck five fours but the damage had long since been done.