Jurgen Klopp’s Group E leaders came into the game knowing they needed to avoid defeat to be sure of reaching the knockout stage for the first time since 2008-09 – and Coutinho gave them the lead with a fourth-minute penalty after Mohamed Salah was fouled by Georgi Dzhikiya.
They doubled their advantage after a superb move 11 minutes later, Coutinho tapping home from Roberto Firmino’s pass.
Firmino netted himself to make it 3-0 at half-time, and Sadio Mane’s sublime volley extended the lead.
Coutinho completed his first hat-trick for the club with a deflected shot, and Mane added the sixth before Salah completed the rout.
Liverpool’s victory means this is the first time five English teams have qualified for the Champions League last 16 in the same season.
Chelsea, Manchester City, Manchester United and Tottenham will join the Reds in Monday’s draw at Uefa headquarters in Nyon, Switzerland.
Asked if his side would be a threat in the last 16, Klopp said: “If we perform like this, if we are that clinical, then yes.
“If we perform like this then it is obviously a threat, 100%.”
This is a huge result for Liverpool, who failed to advance from the group stage on their previous two appearances – in 2009-10 and 2014-15.
Klopp’s side were close to qualifying last month, but Guido Pizarro poked home in the third minute of added time as Sevilla came from 3-0 down to snatch a dramatic draw.
There was no second-half collapse this time as the Reds produced another attacking masterclass to ensure they progress in Europe’s most prestigious club competition.
Spartak had held the Reds to a draw in Moscow but were blown away on Merseyside as Klopp once again unleashed Coutinho, Salah, Firmino and Mane from the start.
The quartet had scored 12 of their team’s 16 goals in five previous group games – and they were once again in ruthless mood.
Spartak were 3-0 down inside 18 minutes.
Dzhikiya clumsily hauled down Salah to allow Coutinho to score before the Brazilian made it 2-0 after finishing a delicious move started by Mane and involving Salah and Firmino.
Firmino made it six goals in as many group games before the goal of the night by Mane – an exquisite volley from James Milner’s inch-perfect cross.
Coutinho’s hat-trick goal came from a deflected shot off Salvatore Bocchetti before substitute Daniel Sturridge teed up Mane for the sixth and Salah pounced from close range for the seventh.
Having beaten Brighton 5-1 in the Premier League on Saturday, Liverpool have now scored 12 goals in two games.
Liverpool emerge from the group unbeaten but despite finishing top and being seeded they could still face a European heavyweight in the next round.
Among the unseeded teams the Reds could face are holders Real Madrid, five-time winners Bayern Munich and Italian champions Juventus.
They cannot face a team from the same country so will avoid Chelsea, and also cannot be drawn against Sevilla, who advance from Group E as runners-up following a 1-1 draw with Maribor.
The other teams they could be paired with are Swiss club Basel, Ukraine’s Shakhtar Donetsk and Porto.
“I don’t mind too much who we get – usually I always get Real Madrid so we will see,” added Klopp.
“There are a lot of really strong teams. This year is quite special. Not often you can face Bayern Munich and Real Madrid, but Juventus and all the others.
“We will not be happy when we see who we face in the next round, but we will be ready.”
Former England winger Chris Waddle, speaking on 5 live
Liverpool can score goals and that’s the hardest part of the game – but coming up against opposition in the next round their defence might struggle.
You can still see Liverpool scoring but will they be strong enough at the back to deal with that quality?
Liverpool are great on the eye but it starts to get hard now.
Liverpool will look to cement their place in the Premier League’s top four when they host neighbours Everton in the first Merseyside derby of the season at Anfield on Sunday (14:15 GMT).