The victory leaves Comoros top of Group A with four points, followed by Eswatini (two) and Mauritius (one).
The match was billed as a winner-takes-all contest, and the Comoros can now celebrate a quarterfinal against defending champions Zimbabwe on Saturday, where they will hope to spring a major surprise.
Youssouf Ibroihim and Soulaimana Ibouniyamine netted for the Comoros, while Ashley Nazira was on target for Mauritius, and in doing so moved to the top of the COSAFA Cup scorers charts with his third of the campaign.
There were few chances in the opening 45 minutes as both teams battled to create clear-cut chances and were reduced to shooting from distance.
Hachim El Haddad flashed a 25-yard shot just wide of goal for Comoros, but the best two chances of the half fell at the other end to Mauritius forward Jean Nabab.
First he found a few yards of space on the right of the box but saw his effort saved by Comoros goalkeeper Fahadi Mohamed, and then hit a shot on the turn that was plucked out of the air by the gloveman.
That left the teams goalless at the break, but Comoros found the opener just minutes into the second half and it came via an excellent strike.
Ibroihim produced a brilliant turn on the edge of the box and with space opening up in front of him, shot into the corner of the net.
Mauritius equalised shortly afterwards though as the lively Nazira netted his third goal of the tournament with a fine finish, and at that stage the group swung back in favour of Eswatini.
But Comoros hit the front again on 65 minutes, Ibouniyamine beating the offside trap and showing great control, before lifting the ball past Mauritius goalkeeper Kevin Jean-Louis.
The action continues in Group B on Thursday, though that pool has already been decided with Malawi having secured top spot.
Mozambique will hope to finish a disappointing tournament on a high against The Flames, who are likely to rest a number of their players ahead of Sunday’s quarterfinal against Zambia.
That match will be played at the King Zwelithini Stadium from 17h30 local time (15h30 GMT).
The second fixture in the pool will be played at the same time as Namibia and Seychelles go head-to-head at the Princess Magogo Stadium.
Both teams are playing for pride, though for Seychelles it is a chance to get just a second ever COSAFA Cup victory and also end a run of 25 internationals without success.
Comoros 2 (Ibroihim 47’, Ibouniyamine 65’) Mauritius 1 (Nazira 53’)
Mozambique vs Malawi (KO 17h30; 15h30 GMT) – King Zwelithini Stadium
Namibia vs Seychelles (KO 17h30; 15h30 GMT) – Princess Magogo Stadium
Group A P W D L GF GA Pts
Comoros (Q) 2 1 1 0 4 3 4
Eswatini 2 0 2 0 4 4 2
Mauritius 2 0 1 1 3 4 1
Group B P W D L GF GA Pts
Malawi (Q) 2 2 0 0 5 1 6
Namibia 2 1 0 1 3 3 3
Mozambique 2 0 1 1 1 2 1
Seychelles 2 0 1 1 0 3 1
Matches Played: 7
Goals scored: 20
Biggest victory: Malawi 3 Seychelles 0 (Group B, May 26)
Most goals in a game: 4 – Eswatini 2 Mauritius 2 (Group A, May 25); Eswatini 2 Comoros 2 (Group A, May 27)
3 goals – Ashley Nazira (Mauritius)
2 – Felix Badenhorst (Eswatini), Youssouf Ibroihim (Comoros), Gabadinho Mhango (Malawi), Gerald Phiri Jnr (Malawi)
1 – Charles Hambira (Namibia),Soulaimana Ibouniyamine (Comoros), Absalom Iimbondi (Namibia), Joslin Kamatuka (Namibia), Siboniso Mamba (Eswatini), Richard Mbulu (Malawi), Sabelo Ndzinisa (Eswatini), Boina Bacar Raidou (Comoros), Witi (Mozambique)