Kersley Appou's hanging header dipped just inside the Namibian goal with two minutes left to secure a 1-0 triumph for the Indian Ocean islanders, their first in the event.
Mauritius now qualify for the lucrative last eight of the event while Namibia, who were twice runners-up in the past and who had high hopes of success this year, bow out after just a single game.
Appou needed several clear chances before he finally claimed the winning strike, which just evaded the despairing dive of Namibian goalkeeper Danzyl Bruwer.
Ironically, Mauritius were playing with just ten men as four minutes earlier Steeve Curpanen had been dismissed off for a second bookable offence.
The defender had caused havoc throughout the game with his long throw-ins but had also repeatedly hacked at Namibian winger Robert Nauseb.
Botswana referee Kuedza Nchengwa had no hesitation in issuing the red card but instead of it being a disadvantage, the added space gave Mauritius more impetus in the closing stages.
Substitute Johnny Edmond floated in a cross which saw Appou stretch to climb above Rodney Doeseb and then watch as the high-looping ball sneaked into the back of the net.
Controversy
Controversy reigned 10 minutes earlier when Floris Diergaardt netted for Namibia but had his close-in header ruled offside by the linesman.
Mauritius had marginally the better chances but looked sloppy in front of goal. Mikaelle Badal tripped as he had a goal at his mercy in the first half and Appou squandered three clear-cut chances before scoring.
The Mauritian victory was probably down to their tight marking of Namibia's danger man Razundura Tjikuzu, effectively played out of the game and only able to get two shots on goal throughout the 90 minutes.
The visitors were restricted to long-range shots which goalkeeper Nicholas Doro competently dealt with.
Mauritius join Angola, Lesotho, Zimbabwe (who all had byes) and Malawi and Swaziland in the last eight.
The last first round match is on April 29 when Mozambique host South Africa. The winner of that game also goes through although with the lucky loser from the four sides defeated in the first round.
Two-time winners Zambia are still in the hunt for that berth following their penalty shoot-out loss to Swaziland at the Somhlolo stadium in February.
Mauritius squad
Goalkeepers: Orwin Castel (Manning Rangers, South Africa), Noam Clarisse
(Faucon Flacq), Nicholas Doro (Olympique de Moka)
Defenders: Stenio Adelaide (Olympiqe de Moka), Sylvain Content, Steeve Curpanen (both Pamplemousse SC), Guillano Edouard, Wesley Laboucherie, Cyril Mourgine (all Olympique de Moka), Narrex Perrine (Faucon Flacq), Henri Speville (Olympique de Moka)
Midfielders: Jean-Sebastien Bax (Santos, South Africa), Gilbert Bayaram,
Jerry Louis (both Olympique de Moka), Desire Periatambee (Grenoble, France),
Christopher Perle (Olympiqe de Moka)
Strikers: Kersley Appou (Pamplemousse SC), Mikaelle Badal (AS Port Louis
2000), Jimmy Cundasami (FC Avirons, Reunion), Johnny Edmond (Olympique de
Moka), Jean-Marc Ithier (Santos, South Africa), Robert Rateau (AS
Capricorne, Reunion)
Namibia squad
Goalkeepers: Danzyl Bruwer (Young Ones), Tiro Tlhabanello (Black Africa)
Defenders: Rodney Doeseb (Chief Santos), Richard Gariseb (Orlando Pirates),
Salomo Heii (Civics), George Hummel (Hellenic, South Africa), Mohammed Ouseb
(Kaizer Chiefs, South Africa), Dixon Witbeen (Tigers)
Midfielders: Silvester Goraseb (Black Africa), Johannes Hindjou (Liverpool),
Ricardo Mannetti (Avondale Atletico, South Africa), Jesayas Naruseb (Beauty
Bucks), Robert Nauseb (Kaizer Chiefs, South Africa), Anthony van Wyk (Blue
Waters)
Strikers: Johannes Jantze (BMC), Augustinus Mukoya (Chief Santos), Michael
Pienaar (FC Fortune, South Africa), Razundura Tjikuzu (Werder Bremen,
Germany)