The Portuguese side earned a 1-1 draw in the Switzerland-hosted first leg on February 18, but Julen Lopetegui's men were in merciless form on Tuesday, with the tricky Algerian leading the way to a fine victory at Estadio do Dragao, which keeps them unbeaten in this season's competition.
Martinez, the scorer of 25 goals across all fronts this term, missed out due to a thigh muscle tear and, although Vincent Aboubakar started and scored in the Colombian's place, Brahimi took centre-stage in his absence, breaking the deadlock with a delightful 14th-minute free-kick.
While the hosts were somewhat wasteful in the first half, they ran riot after the interval as Hector Herrera quickly opened up a two-goal deficit – Brahimi instrumental again.
Casemiro, another to catch the eye on the day, added the third with a spectacular free-kick of his own in the 56th minute.
And Aboubakar got in on the act 14 minutes from time, once again rendering goalkeeper Tomas Vaclik helpless with another incredible effort, ensuring an unhappy homecoming for Basel's Portuguese coach Paulo Sousa, who also saw veteran defender Walter Samuel sent off after a performance littered with rash challenges.
For all their sparkling play in attack, a fearsome Porto work-rate was also in evidence from the off as Casemiro robbed Basel of the ball and fed Cristian Tello on the edge of the area, with Samuel forced to cynically chop down the Barcelona loanee.
Brahimi stepped up to take the resulting free-kick and nonchalantly caressed his effort beyond the static Vaclik and into the net.
Casemiro's audacious effort from distance landed on the roof of the net soon after, but Porto's momentum was checked slightly when captain Danilo was stretchered from the field after colliding with goalkeeper Fabiano.
The second half was barely two minutes in when Porto finally made their superiority tell and the impressive Brahimi was once again central.
The Algeria playmaker battled his way past two defenders on the left flank and teed up Herrera on the edge of the area, with the Mexican curling an unstoppable drive beyond Vaclik.
Porto's third arrived 10 minutes into the second period and it was another exquisite effort, this time courtesy of Casemiro, who ruthlessly smashed his 30-yard free-kick into the top-left corner.
And a night of stunning efforts in Portugal was capped by Aboubakar racing clear and hammering a right-footed effort into the top corner from 20 yards, securing a quarter-final spot for only the second time since Porto's trophy-winning campaign of 2003-04 as Basel's woeful outing was compounded by Samuel's late dismissal for two bookings.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.