The Carthage Eagles needed a win to qualify for the second round but they struggled to break down a resolute South African side.
In the other Group E encounter, Namibia booked a place in the second round after a goalless draw with Mali.
Namibia will take on Angola in the round of 16 on Saturday.
2004 Nations Cup champions, Tunisia finished bottom of the group with two points to head home in an embarrassing manner.
Tunisia joined the likes of Algeria, Ghana in bowing out of the competition in the group stage.