Liverpool will now play Villarreal in the Europa League semi-finals while defending champions Sevilla face Ukraine’s Shakhtar Donetsk.
Liverpool staged one of the most sensational comebacks Anfield has seen to overcome their German opponents in Thursday’s quarter-final second leg.
They were twice left needing three goals to go through, with Dejan Lovren’s injury-time header from James Milner’s cross sealing a 5-4 aggregate victory on a night packed with drama and emotion.
The first legs are on 28 April, with the return legs on 5 May.
The final takes place in Basel, Switzerland, on 18 May.
The draw means that four Spanish clubs could contest both the Champions League and Europa League finals after Real Madrid and Atletico Madrid were kept apart in Europe’s elite competition.