Off-spinner Ali took three early wickets as South Africa lost their last six wickets for 38 runs.
Starting the day on 136 for four, South Africa lost batting kingpin AB de Villiers leg before wicket to the third ball of the day when he went back on his stumps to a ball from Ali which skidded through and hit him low on his pads.
With the third ball of his next over, Ali struck again when Temba Bavuma skipped down the wicket to a ball which drifted past his bat to provide Jonny Bairstow with an easy stumping.
Finn strikes as England push for win
Including the wicket of Faf du Plessis, who fell to Steven Finn with what proved to be the last wicket of the fourth day, three wickets had fallen for no runs.
Only two more runs were scored before Finn bowled nightwatchman Dale Steyn.
Ali claimed his third wicket of the morning when Kyle Abbott, like De Villiers, went back on his stumps and was leg before wicket.
JP Duminy, one of the batsmen whose form has been a concern for South Africa, made 26 not out before Stuart Broad wrapped up the win by having Morne Morkel leg before wicket.
It was a decisive win for England, who went into the series in fifth place on the Test rankings, while top-ranked South Africa suffered a continuation of the batting woes they suffered while being beaten 3-0 in a recent four-Test series in India.
England batted better than South Africa, with most of their batsmen making useful contributions, while Broad, Finn and Ali spearheaded their bowling.
Broad created early havoc in South Africa's first innings, while Finn's three wickets on the fourth day were decisive blows.
Ali's consistency while bowling long spells enabled England captain Alastair Cook to rotate his fast bowlers and Ali finished with match figures of seven for 116.
Finn took six wickets in the match and Broad five.
With only two days before the second Test starts at Newlands in Cape Town on Saturday, South Africa have minimal time in which to find solutions to their batting problems, while their bowling seems certain to be weakened by the absence of star bowler Dale Steyn because of a shoulder injury.
COMMENTS (1)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ