Left-handed Zaryab compiled a cautious but attractive 111-ball unbeaten knock, with five fours, that took two-time champions Pakistan to their target of 190 in 47.5 overs after the pace-duo of Musa and Shaheen had shared five scalps to help restrict South Africa to 189 for nine.
The victory over the 2014 champions means Pakistan will now play the winners of Friday's quarter-final between India and Bangladesh in the second semi-final here on January 30.
But in Saad Khan (26, 62b, 3x4), Zaryab found an able partner and added 65 crucial runs for the sixth wicket, which proved to be decisive in a low-scoring affair.
This was Zaryab's third half-century in the tournament and second successive player of the match award after his 59 in another low-scoring match against Sri Lanka had ensured Pakistan not only qualified for the Super League but eventually topped their group ahead of Afghanistan.
More From This Section
Shaheen struck as soon as he was introduced into the attack in the sixth over and along with new-ball bowler Musa, seized the initiative for his team.
Shaheen struck two telling blows as he removed openers Matthew Breetzke (12) and Jiveshan Pillay (14) just as they looked to be batting themselves in.
Shaheen got Breetzke to edge one to wicket-keeper Rohail Nazir and then bowled Pillay with an in-swinger that went through taking the inside edge of the bat.
Musa was not the one to be left behind as he chipped in with the wickets of captain Raynard van Tonder (4) and Hermann Rolfes (5) as South Africa were left reeling at 43 for four in the 15th over.
Van Tonder was caught at mid-off off a leading edge while Rolfes was caught behind the wicket off an inner edge.
Musa also dismissed a well-set Makwetu (60, 65b, 4x4, 1x6), out pulling the ball, to further reduce South Africa's chances of a fightback.
Pakistan captain Hassan Khan said he was hoping his team would bat better in upcoming matches while praising his players.
"We could have finished it more easily but I think it is a learning experience for all of us. Hopefully, we will learn from the mistakes and not repeat them in the next match.
"The way they (Musa and Shaheen) have bowled throughout and the way they have bowled today is outstanding. I'm relaxed with the boys, the way they are bowling, and really happy and looking forward to other matches today. He (Zaryab) is the wall for our Pakistan U19 team.
Ali Zaryab said this was the biggest moment of his career so far.
"I was always confident I could win the match and knew I had to aim to bat the full 50 overs. This is a huge win for us, a morale-booster since it was a big knock-out match," he said.
"The game was broadcast live and the whole world was watching us. There can't be a better feeling and the whole team is now looking ahead to the semifinals with confidence."
"Our top order did not step up today. Our middle order batted us to a decent position but we were some 20 runs short. As a batting unit we have not really stood up. We put ourselves in trouble with the bat in every game," he said.