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
- Callum Hudson-Odoi: Who is the Chelsea youngster and how good can he be?
- Australian Open: Wozniacki and Stephens through to third round
- Australian Open: Federer battles through against Dan Evans
- Tottenham's Kane out until March with ankle injury
- GFA Normalisation Committee outdoors ad-hoc committees
- Novak Djokovic starts Australian Open with straight-set win
- Houston Rockets: James Harden sets new NBA scoring record
- GPL clubs to play in Special Competition after NC meeting
- Arsenal goalkeeper Petr Cech to retire at the end of the season
- Australian Open 2019: Serena Williams cruises into second round
- Man City cruise past 10-man Wolves to keep pressure on Liverpool
- 40 to battle it out in Maltavator Challenge national finale
- Normalisation Committee postpone launch of Special Competition
- Murray loses possible farewell match at Australian Open to Agut
- De Gea can be Man Utd's greatest keeper - Solskjaer