The Brave Warriors – ranked 115th in the world and without a victory in any of their previous nine Afcon matches – were worthy winners in Korhogo.
Striker Peter Shalulile had an earlier effort cleared off the line but Hotto pounced from Bethuel Muzeu’s cross.
Tunisia, 2004 champions, are 87 places above Namibia in Fifa’s standings.
Listen to the World Football at Afcon podcast
Everything you need to know about Afcon 2023
The remarkable result means Namibia are second in the table on goal difference following Mali’s 2-0 win over South Africa in the later Group E fixture at Amadou Gon Coulibaly Stadium.
Hotto the hero as underdogs astonish
Even in the context of several early surprises in Ivory Coast, it would have been fanciful to anticipate victory for a team who had failed to escape the group stage in three previous attempts against far more experienced and decorated opponents.
Namibia’s return to Afcon after failing to qualify in 2021 pitted them against a side whose 16th successive appearance is a tournament record, reaching the quarter-finals in three of the last four editions and finishing fourth in 2019.
Shalulile, who plays for South African PSL club Mamelodi Sundowns and scored four times in six qualifiers, set the tone for a first half in which the underdogs had by far the better chances, testing Tunisia’s Bechir Ben Said with an early shot and forcing him to stop another strike with his legs soon afterwards.
Namibia manager Collin Benjamin had vowed that his players would live up to their nickname and sternly test any team they face, and his coaching staff and substitutes looked aghast after Hotto narrowly failed to play in Absalom Iimbondi with both players in promising shooting positions and space.
Only Montassar Talbi’s hurried intervention kept Shalulile’s finish from giving Namibia an earlier second-half lead, set up by Iimbondi’s surging run and cross as Namibia continued to enter the box and create danger at will.
Tunisia had been more dangerous after the break, Youssef Msakni almost immediately scoring with a close-range header which was pushed over the crossbar by the impressive Lloyd Kazapua.
Haythem Jouini swiped a shot wide in front of goal and Msakni – aiming to score at a record-equalling sixth Afcon – was also wasteful, finding himself foiled by Kazapua again when he found his range during a sustained period of pressure for the Carthage Eagles.
Just when the momentum change might have made Namibia fans fear their side’s sterling performance would go unrewarded, Benjamin’s players rallied with a late succession of searching deliveries into the penalty area – and Hotto capitalised to spark wild celebrations when Muzeu’s cross found him unmarked to power in the emphatic winner.
Tunisia, whose five-match run of clean sheets came to an end, return to action at the same venue to meet Mali on Saturday (20:00 GMT), while Namibia will play their second game there against South Africa 24 hours later.