The win makes it 16 goals in three years against the Portuguese giants with Liverpool now managing three or more goals in their past six games to continue a fine start to the season.
Porto looked to be a touch wiser from their previous humiliations against Liverpool, but it didn't take long for their efforts to be destroyed when 22-year-old Costa parried a tame Curtis Jones shot away for Mohamed Salah to score an 18th minute opener.
Sadio Mane made it two just before the break when Costa again slipped up, allowing a James Milner cross to travel across the box for an easy tap-in.
Porto appeared to have steadied themselves at the start of the second half, but there was yet another defensive breakdown as Jones found Salah in acres of space for an easy 3-0 goal.
Iranian striker Mehdi Taremi appeared to have eased the pain with a towering header with 15 minutes to go, but it wasn't long before Costa was back up to his old tricks.
Running out in wild fashion to cut out a ball over the top, Costa got nowhere near the pass, allowing Firmino to slot in from distance, before making it five soon after.
Porto boss Sergio Conceicao went full Phil Brown post match, gathering his players on pitch for a telling off, while Liverpool will travel back to England with last season's worries firmly in the rear view mirror.
FC Porto started far better than they had in their previous Champions League embarrassments against Liverpool, on what was the club's 128th birthday.
Things started opening up as both sides attempted to break the deadlock and Curtis Jones continued his decent spell in the starting line up, working his way into the Porto box before unleashing a shot.
His curling effort should have been an easy save for Porto youth product Diogo Costa, but he parried it into defender Zaidu Sanusiinto whose miscontrol was tapped in by Mohamed Salah.
Porto continued to show more courage than in their previous performances against Jurgen Klopp's side, flooding men forward on the counter, but former player Diogo Jota nearly made it two, having a shot blocked in the area before firing the rebound just over.
Jordan Henderson had a tricky night in his 400th appearance for Liverpool, as he tried and failed with passes over the top of Porto's defence, but he nearly did it himself with a rocket of a free kick denied by Costa minutes before half time.
"They've [Porto] got to solve this problem down the right hand side otherwise that second goal will be coming," said talkSPORT commentator Stuart Pearce.
And seconds later it came. A James Milner low cross caused unnecessary chaos in the Porto box, with everyone missing it, and Costa ducking out, as Sadio Mane was there for another tap-in.
Costa had ousted former Argentina number one Agustin Marchesin from the line up, but it quickly became clear that Europe's top tier requires far more experience.
"He's not covered himself in glory, he's been responsible for both goals," Pearce said.
Costa appeared to have redeemed himself, stopping the game becoming a rout when Jesus Corona's header back to his goalkeeper landed short, with Jota latching on before Costa flew out to get a foot on what would have been a certain goal.
Porto seemed to have finally got their act together in the second half, with Costa saving a stinging shot from Jota before Ivan Marcano slid in to cut out what was looking like another easy tap-in.
The 2021 quarter-finalists seemed to have steadied themselves but it took next to no effort for Andy Robertson to continually find space to line up a cross on the left of their box.
Sergio Conceicao finally took note, with more men flooding out to defend the near side, but they made the crucial mistake of leaving Salah free on the right, with the Egyptian easily picked out by Jones to make it 3-0.
Former Wolves midfielder Vitinha nearly stopped the rot with a decent effort saved by Allison Becker, but it wasn't long before Robertson was free again on the touchline, finding Jota who fired just wide.
Porto did manage to find some pride though, with Vitinha comfortably and confidently working some space, before laying the ball to Fabio Vieira who fed Mehdi Taremi for a thumping header.
Humiliation was just around the corner though, with a long ball played over to Roberto Firmino drawing out a wild Costa, who completely missed the ball, allowing the Brazilian to slot past the scrambling 22-year-old.
"The one thing Liverpool have been able to rely on tonight is the charity of Costa in goal," Pearce said.
And soon after it was another five. Curtis Jones volleyed a clearance back towards the goal, with Firmino collecting it and curling home with ease.
The rout was over as Liverpool made it 16 goals in three years against Porto in the Champions League, topping Group B with maximum points from their opening two games.