The Germany defender netted a late equalizer to make up for an earlier defensive howler to give his side two vital away goals at the Donbass Arena.
Darijo Srna put the home side ahead with a wonderful free kick, but Jurgen Klopp's men soon hit back through Robert Lewandowski. Douglas Coasta looked to have given the Shakhtar a slender advantage heading into the Signal Iduna Park leg, but Mats Hummels powered home a late header to leave the match level at the end.
It was Dortmund which took the early initiative, with Jakub 'Kuba' Blaszczykowski having a couple of early efforts on goal.
First, the Poland winger tried an acrobatic overhead kick after a badly-cleared free kick which went wide, before he pulled a shot across goal after being put through by Mario Gotze when he should have done better.
Dortmund continued to press from then on it. Another Gotze ball went to Lewandowski, who sent a tame header at Andriy Pyatov, and the striker had calls for a penalty when he went down under a shove from Srna.
The period of pressure should have culminated in a goal, but the German club could not come any closer than on the 15-minute mark when Hummels sent a Gotze corner onto the bar, with Pyatov well beaten.
All the while, Shakhtar looked dangerous on the break, and the home side gradually began to take control of the match without offering any real craft in the Dortmund half.
After 30 minutes, though, the team was gifted the opener. Felipe Santana clumsily brought down Luiz Adriano around 25 yards from goal, and Srna stepped up to bend the ball into the top corner of the net.
The goal seemed to wake BVB up, and the club soon set about in search of an equalizer. Again, Kuba sent in two speculative efforts, one straight at the keeper, the other fizzing wide.
In the end it was a stroke of fortune which gave the Germans their goal. Gotze crossed from the right, and a complete mishit from Lewandowski took two defenders out of the game and allowed him to pass it into the corner.
The goal came three minutes before the break, but Dortmund almost undid it good work seconds later. A clumsy fumble from Roman Weidenfeller went straight to Luiz Adrianoa and bounced to Alex Teixeira, but Marcel Schmelzer was there to clear if off the line.
After the break, both teams looked capable of grabbing the next goal. At one end, Marco Reus failed to wriggle free of two defenders and saw his shot charged down, before Henrik Mkhitaryan had an effort blocked by Santana.
The two sides took it in turns to counterattack, but their respective defenses were standing firm, and were turnign back wave after wave.
That was until the 69th minute, when Hummels misjudged a long, high ball which fell to Costa, who took the ball down superbly and drove it left-footed beyond Weidenfeller.
Immediately after the goal, Dortmund should have equalized. Gotze darted into the penalty area, seizing on a sloppy defensive header, and squared it to Lewandowski, who somehow contrived to hook an effort wide when he should have grabbed a second away goal.
At the other end, though, Shakhtar still posed a threat of its own. Indeed, the club could have extended the lead when a delightful ball from Alex Teixeria evaded everyone in the BVB box, including the home side's attackers, before Yaroslav Rakytskyy drove a free kick well over the bar.
It appeared that the Ukrainians had done enough to take a slender advantage into the second leg, but with just a couple of minutes remaining, Schmelzer swung in a corner and Hummels atoned for his earlier error by powering home a header, and giving his side the advantage in the tie.