The match finished 1-1 after extra time and the three-time champions will face hosts Ivory Coast in the final on Sunday.
Both regular-time goals also came from penalties with captain William Troost-Ekong scoring after 67 minutes for Nigeria and Teboho Mokoena equalised from a 90th-minute spot-kick. The Mokoena equaliser came after Nigeria thought they had scored a second goal through a tap-in from forward Victor Osimhen.
But play was called back to the other end of the field after VAR alerted the Egyptian referee that South African Percy Tau had been fouled in the area, and the match official concurred.
Khuliso Mudau had a chance to win the South Africa in added time at the end of regular time, but blazed over after goalkeeper Stanley Nwabali parried a Mokoena free kick. South Africa finished with 10 men when Grant Kekana was sent off on 115 minutes for a last-defender foul.