The sixth and final round of games was also notable for another Cristiano Ronaldo goals record in the competition.
The Portuguese superstar scored his ninth in the tournament this season as reigning champions Real Madrid beat Borussia Dortmund 3-2 at the Santiago Bernebeu.
The strike allowed him to become the first player to score in all six Champions League group stage matches in a season. The 32-year-old also equalled Lionel Messi's record of 60 group stage goals.
Last-game surge for Liverpool
Madrid had already sealed their spot in the last 16 before the tie against Dortmund. Liverpool, by contrast, were at risk of not progressing. The Merseysiders went into their game against Spartak Moscow at the head of Group E. But they could have dropped to third if visitors Spartak Moscow won at Anfield and Sevilla overcame Maribor.
However within a dynamic opening 20 minutes, the prospect of a Spartak victory subsided. A brace from skipper Philippe Coutinho and Roberto Firmino put Jurgen Klopp's men in control. Coutinho completed his hat trick five minutes into the second half shortly after Sadio Mané had made it 4-0.
Mané hit his second of the night - Liverpool's sixth 14 minutes from time and Egypt international Mohamed Salah added the the gloss in the closing stages.
"It's really difficult when we go to the next gear and use the space. It was nice to watch tonight," Klopp told BT Sport TV after guiding Liverpool into the last 16 for the first time in nine years.
Spartak's defeat meant Sevilla advanced on the back of their 1-1 draw with Maribor in Slovenia.
Shakhtar are through to the last 16 from Group F after beating Manchester City 2-1. City had already qualified as Group F winners but the defeat was City's first loss in all competition of the season.
Porto sweep past Monaco
Porto also knew a win would take them through in Group G and they swept past the French champions Monaco 5-2.
Cameroon international Vincent Aboubakar scored twice for the Portuguese club, with Yacine Brahimi, Alex Telles and Francisco Soares also on target. Monaco, who finished bottom of the group after reaching the semi-finals last year, replied through Kamil Glik and Radamel Falcao.
RB Leipzig were forced to settle for a Europa League spot in their debut European campaign. They lost 2-1 at home to group winners Besiktas.