Mohamed Salah's first-half goal gave Liverpool the win they needed to secure a place in the Champions League knockout stage.
Jurgen Klopp's side needed a victory with a clean sheet or by two clear goals to make the last 16 - and in-form talisman Salah obliged by beating Napoli keeper David Ospina at his near post in the 34th minute.
Liverpool fully deserved their victory as Ospina partially redeemed himself with fine saves from Salah and Sadio Mane, with the latter and Virgil van Dijk also missing clear chances to extend the home side's advantage.
The clean sheet was the key, however, and Liverpool survived a huge scare in injury time when goalkeeper Alisson made a crucial save from Arkadiusz Milik in a rare Napoli opening.
Liverpool go through in second place behind Paris St-Germain - a feat achieved despite losing three away games in their group.
The Reds, who were beaten by Real Madrid in last season's final, will face one of the group winners when the last-16 draw is made on 17 December.
That could lead to another meeting with the champions, while their Spanish rivals Barcelona, Klopp's former charges Borussia Dortmund and Portuguese champions Porto have also advanced by topping their groups.
Have your say
More Sports Headlines
- AFCON 2019: Salah scores as Egypt move into last 16
- VIDEO: A look at Andre Ayew's record 9 Afcon goals for Ghana
- AFCON 2019: Zimbabwe held after two glaring Musona misses
- AFCON 2019: Omeruo header helps Nigeria qualify for last 16
- Riyad Mahrez, wife ordered to pay former nanny
- AFCON 2019: Amr Warda sent home by Egypt for disciplinary reasons
- Man Utd reach agreement with Palace for £50m Wan-Bissaka
- AFCON 2019: Nigeria players 'owed bonuses and allowances'
- AFCON2019: Pote shots leave Ghana hot in Benin draw
- Ghana 2-2 Benin: Five things we learned
- Ghana 2-2 Benin: Black Stars players rated
- AFCON 2019: Cameroon too strong for Guinea-Bissau
- AFCON 2019: Why this may be Ghana's best yet
- AFCON 2019: Black Stars XI v Benin - Kwadwo Asamoah benched
- AFCON 2019: Can Ghana win? Kinna Likimani doubts