Having drawn against Angola in their first outing, Tunisia's chances of a last-16 place looked set to take a huge blow when Mouez Hassen fumbled Diadie Samassekou's corner into his own net with an hour played.
But Tunisia were level 10 minutes later when a set-piece from Khazri - who hit the crossbar early on - deflected in off Moussa Marega.
The draw sees Mali retain top spot in Group E, while Tunisia sit second, although Angola or Mauritania would overtake the North African side with a win when they face one another on Saturday.
Tunisia coach Alain Giresse was irritated by his side's display against Angola, but the Eagles of Carthage started well - Khazri coming agonisingly close with a dipping free-kick.
Khazri, who also tried to catch Djigui Diarra off his line early on, went close again just after the half hour, sending a low effort wide from the edge of the box.
Taha Khenissi spurned a glorious chance with a close-range header and Tunisia were made to pay for their profligacy when Hassen calamitously dropped Samassekou's cross over his goal line.
Tunisia rallied, though, and luck was on their side when Khazri's set piece, which looked to be on target, looped in off Marega.
Mali's Porto forward seemed set to snatch the points in stoppage time, but Hassen raced out to make a fine save and ensure the spoils were shared at Suez Stadium.