Roque Santa Cruz scored with his first touch to send Malaga into the quarter-finals of the Champions League.
Trailing 1-0 from the first leg, the Spanish side moved level on aggregate when Isco curled in the opener from the edge of the box just before half-time.
Porto's Steven Defour picked up a second yellow in the 50th minute for a cynical foul on winger Joaquin.
Then substitute Santa Cruz, on loan from Manchester City, powered in a 78th minute header from Isco's corner.
While the Paraguayan showed the killer instinct that convinced City to pay £18m for him in 2009, it was team-mate Isco, who was the star of the show.
Y Viva Espana
Malaga join Barcelona and Real Madrid in the quarter-finals - the first time three Spanish sides have reached the last eight in 10 years.
The 20-year-old playmaker, who earned his first full cap for Spain in February, showed remarkable composure as the tension threatened to overcome the Champions League debutants.
With the game finely poised following Porto's narrow lead in the first leg last month, both sides seemed more determined not to concede the crucial opening goal.
In a frenetic first half, there were more yellow cards that shots on target with a rash of cynical tackles disrupting the action.
But Isco provided a rare moment of quality to change the tie just before the break. He turned neatly on the edge of the box before curling a delicious shot over the stranded goalkeeper Helton.
Argentine striker Javier Saviola had found the back of the net five minutes earlier for Malaga but his effort was controversially ruled out.
Helton spilled the ball under a challenge from Julio Baptista but the Brazilian forward looked like he had been pushed into the keeper by Porto defender Danilo.
Porto's hopes were not helped at half-time when influential playmaker Joao Moutinho was forced off with a troublesome thigh injury.
And they made their job even harder four minutes after the restart when Defour picked up a second yellow card for stupidly tripping Joaquin as the winger glided past him.
The visitors retreated to the edge of the box as Isco and team-mates Manuel Iturra and Joaquin teased and probed although Malaga struggled to create any clear-cut chances.
That was until they were finally ahead for the first time in the tie in the 78th minute as Santa Cruz rose highest to head home Isco's outswinging corner.
Porto almost snatched a tie-winning away goal two minutes later when substitute Maicon headed in James Rodriguez's free-kick but the Brazilian defender was marginally offside.
Malaga midfielder Isco:
"An achievement like this seemed impossible only a short time ago. It is a dream for everyone here.
"We came out of the blocks with a lot of intensity because that is what this tie demanded of us. We then settled into the match and showed what we were capable of.
"I think we deserved the win. We enjoyed ourselves and we played in such a way that our fans enjoyed the game too.
"The Champions League is the essence of football and we will continue to enjoy it no matter where it takes us next."
Porto coach Vítor Pereira:
"We are sad with the exit and we understand that the supporters are sad. We are all sad.
"Steven Defour's sending off and Joao Moutinho's injury influenced the match. We tried to react even with ten men and control the game.
"Every event in the game made our life difficult."
Sorry, we were unable to load match stats, please try again.