Tunisia were the better team in the first half against a France that changed nine players in the starting eleven since their last game.
Nader Ghandri had a ball on goal in the eighth minute, but it was disallowed for offside.
But Tunisia continued to show they were the motivated team on the pitch and in the 58th minute Whabi Khazri made it 1-0 with a neat shot.
In the second half, French national team captain Didier Deschamps replaced stars Kylian Mbappé, Antoine Griezmann and Ousmane Dembele, among others.
But even though they created chances, Tunisia persevered and took a giant shock victory against the reigning world champions.
In the very last minute of the match, Griezmann equalised, but it was disallowed for offside after video review.
When Tunisia scored they were second in the group, but when Australia scored 1-0 against Denmark they had to find themselves third in the group.
They still have never made it to a World Cup play-off.
France, which was already ready for the round of 16 before the match, now has to face the runner-up from the group with Poland, Argentina, Saudi Arabia and Mexico.
They will meet later tonight.