Joe Root hit his second successive century for England but again finished on the losing side after an astonishing assault by South African all-rounder Chris Morris squared the series at the Wanderers Stadium.
South Africa won the fourth one-day international by one wicket to set up a series decider in Cape Town on Sunday.
Man-of-the-match Morris, dropped on 14 when South Africa were eight down and still 52 runs short of victory, slammed 62 off 38 balls.
Adil Rashid, the man who dropped Morris—a straightforward chance at mid-off from the bowling of Reece Topley—was brought on to bowl with the scores level and bowled Morris with a googly.
But last man Imran Tahir punched the next ball square for the winning boundary.
That the match went so deep seemed unlikely when England were floundering at 108 for six after being sent in to bat.
But Root made 109 and steered England to a total of 262.
England made two changes after losing the third match in Centurion on Tuesday and both newcomers made crucial contributions.
Batting at number eight, Chris Woakes scored 33 and helped Root put on 95 for the seventh wicket. Woakes followed up by bowling Faf du Plessis and running out AB de Villiers, South Africa’s star batsman, with a superb piece of fielding off his own bowling.
Broad was brought in to strengthen what had proved an ineffectual bowling attack in Centurion and bowled Centurion century-maker Hashim Amla for nought in the first over of the South African innings.
The rest of Broad’s match was less successful, although he had De Villiers dropped on nine off the first ball of his second spell, with Jason Roy diving far to his right but failing to hold on to a fiercely-struck cut.
De Villiers immediately went on the attack, hitting Broad’s next two balls for four and six. He hurried to 36 off 27 balls and was threatening to swing the match back in South Africa’s favour when JP Duminy pushed a ball from Woakes to leg and called for a quick single. Woakes reacted instantly, getting to the ball quickly and hitting the stumps at the batsman’s end with an underarm throw.
Broad was brought back late in the match but was hit for 6,4,4 by a rampant Morris.
No South African batsman was able to score more than Farhaan Behardien’s 38 until Morris took full advantage of his let-off, hitting three sixes and four fours.
Root’s innings was outstanding on a pitch which, unusually for a one-day match at the Wanderers, offered some encouragement to the seam bowlers.