Menzi Masuku decided affairs with his second goal of the tournament in the 84th minute at the Stade Caroline Faye.
Owen da Gama's side needed to avoid defeat to progress, achieving the feat at the expense of the North Africans, who required a win but were eliminated along with Zambia in Group A.
South Africa went through to the next round along with unbeaten pool winners Senegal, who defeated Zambia 1-0 in a simultaneous fixture.
The top three finishers at the competition will qualify for Rio 2016.
Gift Motupa, who bagged a brace in the 3-2 victory over Zambia on Tuesday, fired wide early on for Da Gama's outfit.
Black Leopards attacker Siphelele Ntshangase did the same in the 15th minute after good combination play between Orlando Pirates pair Masuku and Motupa.
Masuku showed intent midway through the first stanza as he forced goalkeeper Sabri Ben Hsa into a fine save with an effort from distance.
Ben Hsa was called into action again soon after as he was tested by a free-kick from South Africa's captain Keagan Dolly.
Dolly tried his luck again in the 38th minute but the Mamelodi Sundowns star drilled his shot straight at Ben Hsa.
Tunisia nearly snuck a goal just before the recess, but Ajax Cape Town goalkeeper Jody February made a crucial save to keep the scores level.
South Africa came under the pressure in the second period, with Nader Ghandri heading inches wide in the latter stages of the contest.
At the other end Motupa dragged an attempt wide before Masuku, who netted against Zambia, sealed the result from close range following excellent work from Bidvest Wits' teen sensation Phakamani Mahlambi.
From a standing start about 45 yards from goal, Mahlambi assessed the situation around him before powering through three or four defenders, flying into the box to the byline and putting the ball on a plate for Masuku to tap in.
Tunisia XI: Ben Hsa, Kechrida, Kchok, Mechan, Yassine, Jelassi, Khelil, Abd, Jouini, Ghandri, Mansour.