It is the first time in eight attempts that the small west African country have made it past the group stages, but they had to hold on in a tension-filled conclusion to ensure the feat.
South African referee Daniel Bennett handed Tunisia a penalty in each half, but denied Togo's Emmanuel Adebayor a legitimate looking claim, inflaming tempers in the closing stages.
Togo needed a draw to edge Tunisia on goal difference in second place in Group D and felt hard done by as a succession of refereeing calls went against them.
They had the cushion of an early goal when took the lead in the 13th minute through Serge Gakpe after a surprisingly dominant showing in the first 20 minutes in which they had several chances.
Adebayor played a telling ball through and Gakpe, who looked suspiciously offside, steered it wide of the Tunisia goalkeeper and into the net.
For a side who needed to win the game, Tunisia were surprisingly timid, but found themselves level on the half hour mark.
Khaled Mouelhi converted a penalty after giant defender Dare Nibombe had been penalised for wrestling Tunisia's Walid Hicheri to the ground.
Togo again proved the more enterprising in the second half with Adebayor using his pace and strength to set up several chances that his team mates squandered and then hit the crossbar himself with a header in the 70th minute.
Just before that Bennett had cautioned the wrong Togo defender and this injustice was inflamed when Adebayor went tumbling down as he tried to round the goalkeeper in search of a second goal.
The referee's decision not to award a penalty evoked the derision of the crowd and the anger of the Togo players.
The situation reached boiling point five minutes later when Nibombe clipped Saber Khlifa from behind and Bennett awarded another penalty after a few seconds deliberation.
Needing to score to win, Mouelhi sent the keeper the wrong way but hit the upright.
Togolese tempers then ran unchecked with four players booked in rapid succession.
Tunisia attacked in the five minutes of additional time, but Togo held out to secure a meeting with Burkina Faso in the quarter-final in Nelspruit on Sunday.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO Sports and on Facebook at AhramOnlineSports)