Malaga looked as if it had done enough to advance to the last four of Europe’s most prestigious club competition for the first time in its history.
However, the Spanish Liga club was cruelly denied a famous victory when the Germans scored two goals in injury time.
The tie was delicately poised after the sides battled to a scoreless draw in the first leg at La Rosaleda but Malaga stunned the Germans 25 minutes into the return fixture.
Joaquin did ever so well to shake off his marker and unleash a low drive that rolled past the outstretched hand of Dortmund goalkeeper Roman Weidenfeller.
The hosts were shocked and now needed two goals to win the tie but they pulled one back five minutes before the half-time break when Robert Lewandowski rounded the keeper and slid the ball into the open goal.
It was now 1-1 on the night and aggregate and the next 45 minutes would decide the outcome of the intense tie.
Mario Gotze had two excellent chances to give Dortmund the lead but could not beat Willy Caballero, who seemed to have the youngster’s number in both legs.
Those misses came back to haunt the hosts, as Malaga must have thought it had sewn up the tie when Eliseu tapped in to give them a 2-1 lead.
Dortmund now needed two goals in the last eight minutes to advance and it looked done and dusted until Marco Reus popped up in the 92nd minute to set up a grandstand finish.
The Germans then completed the comeback at the death when Felipe Santana tapped in to spark wild celebrations in the ground. Malaga will feel especially aggrieved, as a handful of Dortmund players seemed to be offside.
But it’s Borussia Dortmund who live to fight another day in the Champions League after an unforgettable evening.