A goal from Wahbi Khazri put Tunisia in front, but it appeared that they had been denied a famous win by a 98th-minute equaliser from Antoine Griezmann.
However, after a number of minutes, VAR advised the referee to go to the monitor, leading to the official to interpret that Griezmann had been active in an offside position before scoring after a failed clearance from a defender.
Despite the drama, Australia's victory over Denmark means that Tunisia miss out on progression to the knockout stages, instead finishing in third place in Group D while France progress as winners.
Having made widespread changes to his starting lineup, France boss Didier Deschamps watched his side start slowly, handing the initiative to a Tuninisa side who were motivated to record an unlikely win.
Within the opening quarter-of-an-hour, the African nation thought that they were ahead when Nader Ghandri superbly volleyed home from Khazri's free kick, but the midfielder had strayed marginally offside.
France created nothing of note until the 25th minute with Kingsley Coman running onto a pass inside the penalty area before slicing the ball harmlessly wide of the near post.
Despite that opening, Tunisia remained much the better side, and Khazri forced a solid save out of Steve Mandanda with a swerving volley from 25 yards out.
In the second half, the match remained as uninspiring as the first, but just before the hour mark, the Education City Stadium erupted as Tunisia deservedly went in front.
After Youssouf Fofana was dispossessed in midfield, Khazri was able to advance towards goal, moving to the side of Raphael Varane before poking a shot wide of Mandanda from the edge of the area.
With the other game remaining goalless, Tunisia had moved into second spot in the group, but that lasted a matter of minutes as Australia regained second spot by taking the lead versus Denmark.
Deschamps responded with a triple change, which included the introduction of Kylian Mbappe, and Tunisia did not need a second invitation to drop deeper in a bid to protect their narrow lead.
However, the clear-cut chances that were expected did not arrive with only substitute Ousmane Dembele forcing Aymen Dahmen into any kind of save with a shot from distance as they game entered the final 10 minutes.
Mbappe burst into life with two minutes left, cutting inside onto his right foot before bringing a brilliant save out of Dahmen as the ball appeared to be heading towards the far corner.
Randal Kolo Muani went even closer, curling the ball narrowly wide of the post from 20 yards via a marginal deflection, before Griezmann's superbly-taken volley from 10 yards was ruled out by a combination of technology and the referee's judgment, sparking mixed scenes in the Tunisia camp who had to cope with the overriding feeling of disappointment despite recording one of their most noteworthy wins in their history.