Habib Diallo fired Senegal ahead early on before Franck Kessie's late penalty wrestled the AFCON hosts back into the match, and Moussa Niakhate was the only player to miss in the shootout to send the Lions home.
Brought in after the disastrous 4-0 defeat to Equatorial Guinea ended their group stage, Ivory Coast interim boss Emerse Fae took training for the first days of his tenure without knowing if Les Elephants were still in the tournament.
It was perhaps no surprise the hosts started slowly as Sadio Mane won a corner inside the first 40 seconds before providing the assist for Al-Shabab striker Diallo to rifle into the roof of the net after only four minutes.
The hosts improved after a long delay for Ibrahim Sangare to receive treatment for a studs-up challenge by Mane that only drew a yellow card.
Substantial periods of possession drew little reward however as Senegal's stout five-man defence repelled everything with ease, even when the boundless energy of Seko Fofana helped Ivory Coast burst into the box several times.
There was nonetheless the sense that the defending AFCON champions had the ability to score at the flick of a switch, as shown shortly after the break when Kalidou Koulibaly's quick free-kick sent Ismaila Sarr through on goal. Yahia Fofana tipped wide his low effort.
Sarr had a penalty claim denied before Ismail Jakobs and Lamine Camara missed the target as Senegal turned the pressure up despite Ivory Coast introducing Nicolas Pepe and Simon Adingra off the bench.
But it was Sebastien Haller who the home fans really wanted to see, and after an ankle injury delayed his arrival to the Cup of Nations the hosts' poster boy finally appeared off the bench. Moments later, a superb double save by Edouard Mendy kept his clean sheet before Mane shot wide up the other end.
Ultimately it was Mendy responsible for allowing the Ivorians the chance they needed to draw level, as he wiped out Pepe in the box following a smart ball in behind. Initially rebuffed by the referee, the hosts' prayers were answered by VAR and Kessie slotted home the penalty.
Fofana denied Mane in the middle of an open extra-time period that failed to produce a winner as penalties beckoned.
The first four penalties were dispatched before Niakhate hit the post for Senegal, allowing Kessie to step up and seal the win.