Senegal s forward Sadio Mane controls the ball during the Africa Cup of Nations (CAN) 2021 round of 16 football match between Senegal and Cape Verde at Stade de Kouekong in Bafoussam on January 25, 2022. AFP
The goal came on 63 minutes after the islanders had goalkeeper Josimar 'Vozinha' Dias and midfielder Patrick Andrade sent off.
Mane was forced to leave the field soon after breaking the deadlock as his face was swollen following a collision with Vozinha, which led to the second red card.
Bamba Dieng, who replaced Mane, added a second goal two minutes into added time after a breakaway left a single Cape Verde defender facing two Senegalese attackers.
Senegal, seeking to win the flagship African competition for the first time after twice finishing runners-up, will meet Mali or Equatorial Guinea on Sunday in the quarter-finals.
Before the kick-off, the teams and match officials stood still and silent in memory of the eight people who died in a crush at Olembe Stadium in Yaounde on Monday before Cameroon defeated the Comoros.
Cape Verde welcomed back head coach Pedro 'Bubista' Brito, who had to watch the group stage in the island nation as he recovered from coronavirus.
In the opposite dugout was Aliou Cisse, a Cup of Nations runner-up as a player in 2002 and as a coach in 2019.
Having failed to score in their last two group matches against Guinea and Malawi, Senegal almost took the lead 40 seconds into the match through Mane.
Following a move down the left flank, the ball ran loose in the box and the reigning African Footballer of the Year unleashed a thunderbolt that cannoned off the far post.
Senegal seemed determined to end their goal drought early in the match and continually put pressure on the Cape Verde defence at Stade Kouekong in the western Cameroon highlands.
Cape Verde suffered a major blow on 21 minutes when Andrade was sent off for stamping on the leg of Pape Gueye.
The Algerian referee initially produced a yellow card, then upgraded it to a red after watching replays of the incident on the touchline VAR monitor.
Despite being numerically disadvantaged, Cape Verde contained Senegalese attacks until Mane came close to breaking the deadlock six minutes before half-time.
A slick exchange of passes inside the box set Mane free, but Vozinha and Steven Fortes combined to block his attempt to score.
As if facing one of the tournament title favourites with 10 men was not sufficiently difficult, Cape Verde were reduced to nine men when Vozinha was sent off 12 minutes into the second half.
The goalkeeper and Mane collided as they chased a long pass and after going to the monitor again, the referee brandished his red card to the goalkeeper, who had left the field suffering from concussion.
Marcio da Rosa, who plays in the Portuguese third division, took over as goalkeeper with forward Garry Rodrigues taken off.
Senegal were quick to take advantage of having two extra outfield players as Mane scored with a superbly placed shot into the roof of the net when a corner was only partially cleared by Nuno Borges.