The first chance of the game fell to the Spanish champions in the sixth minute, when Cristiano Ronaldo drilled in a cross from the left flank only for Mesut Ozil to fail in making contact with the ball.
Madrid, though, soon started dominating proceedings at the Signal-Iduna Park, and could have taken the lead in the 23rd minute had Angel Di Maria not shot over the Dortmund crossbar from a good position.
Three minutes later Ronaldo failed to keep his attempt on target from the left side of the German champions' penalty box.
However, Dortmund refused to allow Jose Mourinho's side to call all the shots, with Kehl testing Casillas with a brilliant curling effort from 20 yards.
However, the German champions' lead lasted just two minutes, as Ronaldo latched on to a precise through ball from Ozil before lifting it over Roman Weidenfeller and into the Dortmund goal.
Madrid had Casillas to thank at the start of the second half, as the Spanish goalkeeper brilliantly denied Mario Gotze with a diving save, and then Sergio Ramos had to clear the resulting corner from underneath the crossbar.
Di Maria had a good chance to put the visitors in the lead in the 55th minute with a shot from the left side of the penalty area, before Karim Benzema agonisingly failed to put the finishing touches to Michael Essien's cross.
That came to haunt Madrid on 64 minutes when Dortmund scored their second goal of the evening.
Casillas punched clear a Gotze cross only for the ball to land on the edge of his 18-yard box, from where Schmelzer drilled home a low drive into the bottom left corner of the goal.
The German side came close to making it 3-1 in the 78th minute when Kevin Grosskreutz shot over the bar.