South Africa, set a huge 380 for victory, were bowled out for 202 shortly after tea on the fourth day when Ali took two wickets in two balls to remove Morne Morkel and Duanne Olivier.
That gave the off-spinner a return of five for 69 in 19.5 overs and 25 wickets in total in a series where he also scored 252 runs.
"This series I have felt more consistent with bat and ball, especially ball. I felt good rhythm after the first game. I contributed with the bat a couple of times," Ali told BBC Radio's Test Match Special.
"In general, I'm very pleased," the 30-year-old Worcestershire all-rounder added.
It was also just South Africa's second defeat in 20 away Test series, their other overseas campaign reverse in that sequence coming against India in 2015/16.
"I'm very pleased, a fantastic effort," said an elated Root.
"We knew the target was a lot of runs and we set off brilliantly with the new ball."
South Africa, 43 for three at lunch, saw Hashim Amla (83) and captain Faf du Plessis (61) put on 123 for the fourth wicket after James Anderson, bowling from the newly-named James Anderson End on his Lancashire home ground, and Stuart Broad had made early inroads.
Ali then took three wickets for five runs in 11 balls - including the prize scalp of Amla - as the Proteas collapsed from 163 for three to 173 for six.
"Broad and Anderson are relentless and our batting line- up wasn't strong enough for them," said du Plessis after a match that seemed set to mark the end of Russell Domingo's tenure as South Africa coach.
"To lose Hashim and then the cluster of wickets was disappointing."
Earlier, Ali, both the man-of-the-match and the hosts man-of-the-series, made 75 not out off just 66 balls in England's second innings 243, having been dropped on 15.
South Africa's already difficult task was not helped when they lost both openers, leaving them at 18 for two.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)