The host nation sneaked into the round of 16 after clinching the final best third-place finisher spot despite their disappointing group stage campaign.
Abdou Diallo and the talent Lamine Camara were recalled to the Senegales line-up, while the Elephants surprisingly left out Franck Kessie, Sebastien Haller and Nicolas Pepe following the big loss to Equatorial Guinea.
Senegal needed just three minutes to get the breakthrough, as Mouhamadou Diallo got on the end of a cross from Sadio Mane before rifling the ball into the roof of the net.
The home side, meanwhile, took a while to get going in the first half but managed to gain a bit of control after the midway point, but clear-cut chances were hard to come by.
That all changed with five minutes left in the first half when Fofana barged into the box to latch onto a loose ball, but the midfielder was denied a fine save by goalkeeper Eduaord Mendy.
AFCON 2023: Nigeria 2 – 0 Cameroon
Senegal nearly began the second half in similar fashion to the first, when Camara did well to pick out captain Kalidou Koulibaly, who rose well to meet the cross but sent his header just wide of the mark.
Cote d’Ivoire responded with a double change for the final 20 minutes as Kessie and Haller replaced Ibrahim Sangaré and Jean-Philippe Krasso, while the defending champions threw on Nicolas Jackson for Diallo earlier.
With eight minutes to play, the home nation was awarded a penalty for Mendy’s foul on Nicolas Pepe after a video assistant referee (VAR). Kessie stepped up and calmly slotted into the bottom corner, sending the game into extra time.
Both sides struggled to keep the high tempo going in extra-time despite the substitutions, as the final 30 minutes failed to provide any clear-cut openings at either and of the pitch.
It was the home nation who held their nerve to triumph in the shoot-out by converting all five penalties, after Moussa Niakhaté hit the upright for Senegal who bowed out of the tournament.