It was only the second triumph in the opening test of a series for England in 11 years as South Africa’s status as the top-ranked test nation looked distinctly hollow, extending their number of successive tests without a win to seven.
England will take a massive morale boost into the rest of the four-test series with a quick turnaround time before the second test starts in Cape Town on Saturday.
South Africa already had their backs to the wall at 136 for four wickets overnight, chasing an improbable 416 for a win, and their hopes of survival rested heavily on AB de Villiers.
But the stumper-batsman lasted only three balls at the start of the final day and was out on his overnight score of 37.
De Villiers was trapped leg before wicket to Ali and failed to overturn the decision on review with the television technology showing the ball would have grazed the leg stump.
South Africa had still not added a run to their overnight tally when Temba Bavuma was stumped by Jonny Bairstow off Ali’s bowling in just his second over of the day.
Nightwatchman Dale Steyn was bowled by Steven Finn, who had been the wrecker-in-chief late on the fourth day, and Kyle Abbott was also trapped lbw by Ali as England grabbed the first four wickets of the day for just seven runs.
Dane Piedt tried his best at stonewalling, going 27 balls without scoring before edging a ball from Chris Woakes onto his pads, which popped up for James Taylor to catch at short-leg.
The last man out was Morne Morkel, leg before to Stuart Broad for eight, leaving JP Duminy 26 not out as he held up one end for South Africa.
Finn finished with figures of 4-42, while Ali took 3-47.
The second test at Newlands runs from Jan. 2-6 with the two remaining matches in Johannesburg and Pretoria.