A Mohamed Salah first-half goal and brilliant late save from goalkeeper Alisson 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 Alisson made his 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.
Liverpool’s run to the Champions League final last season was characterised by a series of blistering attacking performances that simply swept away opponents.
Ultimately, though, it was undone by one of the most calamitous goalkeeping performances in a major final as errors by Loris Karius ensured Liverpool lost 3-1 to Real Madrid in Kiev.
Reds boss Klopp, perhaps belatedly, acted in the summer when he paid £67m to sign Brazil keeper Alisson from Roma.
Alisson has already added an extra layer of security to Liverpool’s defence along with £75m centre-half Virgil van Dijk – but the big players are bought to shape the important moments, and how Alisson delivered at Anfield.
Liverpool had missed a succession of chances but the only real damage to their Champions League aspirations could be inflicted by a Napoli goal and it almost arrived at a time when they would have had no chance to respond.
There was an air of desperation around Anfield as Milik found himself in front of goal eight yards out, deep into four minutes of added time. But as the stadium held its breath Alisson reacted quickly, made the block and Liverpool were through.
Alisson was an expensive, albeit necessary investment and that investment paid off right here