Although they fell behind to a Fikayo Tomori strike, the Reds rallied to round off a perfect group-stage campaign.
And this result meant Milan not only failed to join its opponent in the next round but also missed out on a Europa League spot.
Liverpool saw out a historic win – their first at San Siro against Milan – with little trouble.
Despite knowing the stakes, Milan wasted much of the first half-hour showing too much respect to a Liverpool team whose many changes were evident in its disjointed play.
But when the first real chance of the game finally came, it went to the host, and it took it to give a raucous home crowd a deserved moment of release.
Tomori is unlikely to have many easier opportunities than a five-yard tap-in that came about when a corner somehow squirmed past three Liverpool defenders.
To their credit, the visitor improved immediately, and it was soon level courtesy of a cool Salah finish after an Alex Oxlade-Chamberlain effort had been parried.
Liverpool kept up that new standard following the break, taking the lead for the first time 10 minutes after the restart.
Fresh from scoring a late weekend winner at Wolves that saw him described as a "legend" by manager Jurgen Klopp, Origi was in the right place again to head home after Sadio Mane had been denied.
With his team looking comfortable, Klopp looked to protect his big hitters, with Mane and Salah making way for Naby Keita and Joe Gomez.
But those changes did little to disrupt the visitor's rhythm, or encourage Milan to push for the win that could have saved its European season.