Roberto Firmino completed the scoring in the first leg tie to hand the Portuguese league leaders their heaviest-ever home defeat in European competition and virtually guarantee Liverpool a quarter-final place.
Salah’s 29th-minute goal arguably upstaged Mane’s treble as the Egyptian took his tally to 30 goals in all competitions this season.
Liverpool midfielder James Milner’s shot hit the post and rebounded to Salah who flicked it up over Porto goalkeeper Jose Sa, then controlled it with his head and touched it into the net.
Liverpool took their goal tally in the Champions League this season to a remarkable 34 goals in nine games, including qualifiers, as they equalled the record for the biggest away win in the knockout stages.
“We needed to play as a team and that’s what we did,” said Mane. “We played great football, created great chances and scored five goals. I enjoyed the fifth goal the most.”
Twice European champions Porto sorely missed injured leading scorer Vincent Aboubakar and midfielder Danilo although they began brightly as Otavio saw a shot deflected onto the roof of the net by Dejan Lovren’s outstretched leg.
For a while, it was an end-to-end game but swung Liverpool’s way with two quick goals, both helped by poor defending.
Liverpool went ahead in the 25th minute when they won the ball in midfield and Georginio Wijnaldum found Mane whose shot squirmed through Sa’s arms and into the net.
Four minutes later, Milner won the ball off Moussa Marega, ran on as the Porto defence hesitated, waiting in vain for a foul to be called, shot against the post and Salah did the rest.
Porto also started the second half brightly but were again caught when Salah opened them up with a diagonal pass to Firmino whose shot was stopped by Sa, only for Mane to snap up the rebound.
Already facing a record home European defeat, the hosts were sliced apart again in the 69th minute as Mane won the ball, burst forward and released Milner whose low pass into the centre was turned in by Firmino.
Mane completed his hat-trick with another unstoppable effort from outside the area with five minutes left.
“We didn’t expect this. There are days when things don’t work out the way your expect,” said Porto left back Alex Telles.
”We could have scored at the start, we had some chances but we weren’t efficient.
“We will try to play a good game at Liverpool. We are not going to hide... we represent a great club and we have to honour the shirt.”
Meanwhile, after a few relatively subdued performances, Liverpool forward Sadio Mane burst back into life on Wednesday with his first hat-trick for the club.
The Senegalese doubled his tally in the Champions League to six as he led the five-times European champions to a 5-0 thrashing away to a hugely disappointing Porto team.
“Honestly, it was not an easy game even if we scored five. We played great football from the beginning to the end,” said the former Salzburg and Southampton player. “We created so many chances and scored five, so it was deserved.”
Liverpool manager Juergen Klopp agreed that it was a perfect display from his team -- though he avoided singling out Mane for special praise.
“It was very professional, very mature in the right moments, very aggressive, good defending, good counter-attacking, keeping the ball, moving them around. In this game it was possible, usually it’s not that easy,” said the German.
Klopp said that, for him, the high point of the game was when they were 2-0 ahead in the first half and Mohamed Salah won the ball back in midfield.
“That’s what you need in a game like this, a competition like this,” he said.
”I saw a lot of fantastic performances tonight, a result like this is only possible if they are all spot on. I think (Andy) Robertson played an outstanding game, finally he found his crosses, I thought they were in Scotland or somewhere which was good to see.
“Of course Sadio is man of the match but Roberto Firmino’s work rate was outstanding again.”
Klopp’s opposite number Sergio Conceicao said that Porto had the game under control until Mane broke the deadlock in the 25th minute.
“Liverpool have some very fast players. After their second goal, they started to enjoy the game we let our heads drop,” he said.