Victor Moses snatched a dramatic late 3-2 win for Chelsea deep into stoppage time at the end of a pulsating night at Stamford Bridge.
The former Wigan player, only introduced with 10 minutes remaining, rose at the near post to powerfully head home a corner with the last action of the game.
Earlier Shakhtar Donetsk had twice pegged Chelsea back, Willian cancelling out goals from Torres and Oscar.
Blues boss Roberto Di Matteo refused to shy away from the importance of tonight's game from the moment the final whistle went in the reverse fixture - which Chelsea lost two weeks ago - branding it must-win.
That made his decision to leave John Terry on the bench - albeit for match-fitness reasons - a massive gamble, with the holders having shipped 10 goals in the four games their captain had missed during his domestic racism ban.
Shakhtar never looked back after racing into an early lead in the first meeting, but they saw the tables turned thanks to Pyatov, whose attempted clearance from Yaroslav Rakitskiy's backpass was closed down by Torres and careered into the net.
The visitors were level in the ninth minute when Willian fired home Fernandinho's cutback after a crucial slip by Ryan Bertrand.
Torres was looking more interested than he had in the defeat in Donetsk, twice going close to nodding in brilliant Branislav Ivanovic crosses but, otherwise, Shakhtar were in complete control.
Chelsea fans began calling for Terry but they were soon celebrating their side going ahead completely against the run of play thanks to the madness of Pyatov and genius of Oscar. Pyatov came charging out to head Juan Mata's harmless 40th-minute cross clear but the ball fell straight to Oscar, who produced a sublime 40-yard half-volley that sailed over the goalkeeper and into the net.
Stung by the injustice of being behind, Shakhtar took less than two minutes to equalise again after the restart with another stunning move, Fernandinho's defence-splitting pass and Darijo Srna's cross allowing Willian to stroke home.
Mikel was rightly denied his first goal for five years by an offside flag but Chelsea had genuine cause for complaint 16 minutes from time when a flying Ramires was convinced he had been bundled over in the box by Srna but referee Carlos Velasco Carballo was unmoved.
Moses came on for Oscar and Willian cleared Gary Cahill's dangerous header as Chelsea poured forward but they were almost caught out on the break, leading Luiz was booking late on and nearly a winner for Henrik Mkhitaryan. But in the 94th minute, Chelsea won a corner which an unmarked Moses nodded in seconds before the final whistle.