Mohamed Bayo headed in a dramatic winner in the eighth minute of injury time to seal last eight spot for Guinea.
Equatorial Guinea midfielder Federico Bikoro was dismissed 10 minutes after the break for catching Bayo in the ribs with his studs.
The National Thunder were awarded a spot-kick midway through the second half after Sekou Sylla caught Iban Salvador, but captain Emilio Nsue hit the base of the right-hand upright.
The last-16 tie at the Ebimpe Olympic Stadium in Abidjan was heading for extra time when Bayo, of French Ligue 1 side Le Havre, struck right at the death to spark frenzied scenes of celebration among the Guinea team and their large support.
Bayo ‘s header, clocked at 97 minutes and 38 seconds, is the latest winning goal in a knockout match in the history of the Africa Cup of Nations.
It was a historic moment for the Syli National, who had never previously won a Cup of Nations knockout tie — they were runners-up in 1976, in an era when the final four played a round-robin format to decide the winner of the trophy.
They will now stay in Abidjan for a last-eight tie on Friday against the winner of Sunday’s other game between Egypt and the Democratic Republic of Congo.
“It means a lot. We knew that this could be a historic occasion,” said Guinea coach Kaba Diawara, who was in tears at the final whistle.
“Even if the way we did it was not beautiful, even if we did it at the last minute, we don’t care. Winning is the only thing that matters.”
Equatorial Guinea had reached at least the quarter-finals on their previous three appearances at Afcon, but Juan Micha’s side could not repeat that achievement as 34-year-old Nsue was left to rue his costly miss while Guinea celebrated at the final whistle.