Yousuf followed up scores of 53 and 117 with an unbeaten 58 as Pakistan reached their target of 198 with 11 balls to spare to take a 2-1 lead in the five-match series.
The experienced Yousuf shared a stand of 79 with captain Shoaib Malik (42) and an unbroken partnership of 55 with Misbah-ul-Haq (29 not out).
Earlier, South Africa were bowled out for 197 in 49.2 overs. With the five-match series tied at 1-1, South Africa's decision to bat backfired due to a combination of disciplined bowling and alert fielding.
Skipper Graeme Smith and Herschelle Gibbs (19) put on a brisk 43 to give South Africa a solid foundation before pacer Umar Gul had the latter caught behind in the ninth over.
Jacques Kallis (13), looking out of sorts after his impressive 421 runs in the two-test series, fell to a brilliant low catch by Misbah-ul-Haq at cover to give Afridi his first wicket.
The in-form AB de Villiers then looked fluent in his 17 from 28 balls before he was taken by a sharp catch at mid-wicket by Afridi off Iftikhar, leaving South Africa on 77-3 from 20 overs.
Smith was eventually run out in the 33rd over by his counterpart Shoaib Malik after hitting four boundaries, while Kemp fell at the end of the 41st over, bowled by Afridi after blasting two big sixes.
Mark Boucher (17), Shaun Pollock (1) and Albie Morkel (12) were all out caught while attempting to slog boundaries.
Smith top-scored with 48 from 68 balls while Justin Kemp contributed 42. Their fourth-wicket partnership of 45 from 75 balls was the best of a disappointing innings.
SCORE BOARD
SOUTH AFRICA
Gibbs c Akmal b Gul 19
Smith (run out) 48
Kallis c Misbah b Afridi 13
De Villiers c Afridi b Iftikhar 17
Kemp b Afridi 42
Boucher c Malik b Rehman 17
Morkel c Nazir b Iftikhar 12
Pollock c & b Afridi 1
Botha (not out) 7
Langeveldt b Iftikhar 4
Ntini b Gul 0
Extras (LB-8, W-9) 17
Total (all out, 49.2 overs) 197
Fall of wickets: 1-43, 2-57, 3-77, 4-122, 5-162, 6-174, 7-181, 8-189, 9-196.
Bowling: Gul 8.2-3-25-2, Tanvir 9-0-36-0, Afridi 10-0-37-3, Iftikhar 8-0-33-3, Rehman 10-0-42-1, Malik 4-0-16-0.
PAKISTAN
Yasir c Kallis b Ntini 18
Afridi c Smith b Pollock 32
Younis c Botha b Morkel 10
Yousuf (not out) 58
Malik c Boucher b Morkel 42
Misbah (not out) 29
Extras (LB-5, W-7, NB-1) 13
Total (for 4 wickets, 48.1 overs) 202
Fall of wickets: 1-42, 2-58, 3-68, 4-147.
Bowling: Pollock 10-0-44-1, Ntini 6-0-23-1, Langeveldt 5-0-20-0, Morkel 9.1-2-30-2, Botha 10-0-50-0, Kallis 8-1-30-0.