The match seemed to be heading for an inevitable, mundane draw at lunch until Kevin Pietersen (three for 52) and Stuart Broad (five for 69) shared eight wickets as South Africa slumped from 120 without loss to 258 for nine.
At that point, South Africa captain Graeme Smith bravely declared the innings and set England the difficult target of 253 in 39 overs.
They were on 130 for four when the teams shook hands with six overs remaining after a both sides each had a dip at victory.
South Africa stayed 1-0 ahead in the three-match series with one to play at Lord's starting on August 16.
England must win that match to not only level the series but also prevent the Proteas from leapfrogging them at the top of the world rankings.
England skipper Andrew Strauss showed his team's intentions from the outset of their second innnings by opening with his most explosive batsman Kevin Pietersen, more accustomed to number four.
Pietersen hit three boundaries off the first over, bowled by Morne Morkel but it did not last and he was caught at mid-on off Vernon Philander in the fourth over.
Strauss and then Jonathan Trott came in at three and four and it was difficult to work out whether England were still chasing a win or settling for a draw.
Strauss, in the process, scored his 7,000th test run, two days after Pietersen had reached the same milestone.
Alastair Cook's busy 46 from 62 balls maintained an outside chance of victory and when he was caught off a leading edge to Dale Steyn, England sent in the pugnacious wicketkeeper-batsman Matt Prior to try and keep up the chase.
Prior, though, was run out for seven after a mix-up with Trott and that was as far as England's charge went.
Trott finished 30 not out and Ian Bell was on three as Jacques Kallis bowled in the last hour indicating he had recovered from the back spasms that kept him at the team hotel all day on Sunday.
South Africa, resuming on an overnight 39-0, cruised through the morning session until they lost Jacques Rudolph in the last over before lunch when he was lbw to Pietersen.
The spinner then had Graeme Smith caught at short leg by James Taylor off a leading edge, though he unsuccessfully reviewed the decision as replays were inconclusive.
When Hashim Amla drove a Pietersen full toss to Cook at cover, it was 182 for three. Broad then got involved, removing AB de Villiers (44) and JP Duminy (0) lbw in successive balls to make it 209 for five.
Philander (6) was Broad's third lbw victim while Kallis gloved Broad to Prior for 27.
James Anderson brilliantly caught and bowled Dale Steyn, before Broad made Morkel his fifth wicket. Alviro Petersen, coming in at number eight because of his hamstring injury, was 16 not out.
South Africa, who won the first test at The Oval by an innings and 12 runs, scored 419 in their first innings after losing the toss, as Petersen hit 182.
England replied with 425 courtesy of a sparkling century from Pietersen. Intermittent rain deprived 72 overs from the match, including more than half a day from Sunday's play.