After Percy Tau missed a penalty for South Africa, Mali captain Hamari Traoré broke the deadlock after an hour and Lassine Sinayoko added a second six minutes later to put the west Africans ahead of Namibia on goal difference in the standings.
Traore was quickest to react and scored from centimetres out after South Africa goalkeeper Ronwen Williams had barely kept out a curling free kick from Sekou Koita at the Amadou Gon Coulibaly Stadium.
The second goal came soon after as a through ball put Sinayoko goal side and he shrugged off two defensive challenges to score from close range.
South Africa were handed a penalty after 18 minutes when a VAR check revealed an elbow in the face of striker Evidence Makgopa from Sikou Niakate as the ball was played into the Mali area and the defender attempted to block the tall forward from getting to it.
But Tau blasted it well off target to squander the opportunity to go ahead.
He did force a good save out of Djigui Diarra as South Africa dominated the first-half exchanges but they were almost caught out on the stroke of halftime with a defensive blunder that left Sinayoko through on goal but his effort was blocked by Williams.
Mali had two excellent chances soon after the break, first for Koita, who blasted wildly over, and then for Amadou Haidara, who was guilty of a horror miss when he was clear on goal but hurried his effort.
Yet they were quickly forgotten as the two goals put Mali firmly in the driving seat of a group that was always expected to be closely contested.
Earlier, Namibia scored a late winner through winger Deon Hotto to upset Tunisia in the other Group E game in Korhogo.
Mali and Tunisia next meet on Saturday while South Africa are up against neighbours Namibia on Sunday, both in Korhogo.