The Ukrainian champions arrived in Madrid without 13 first-team players after 19 positive Covid-19 tests throughout the club left them needing to call up youth-team players.
But Luis Castro’s young side were undaunted and swept into an amazing, but thoroughly warranted, 3-0 lead at Real’s empty Alfredo di Stefano training ground.
Goals from Luka Modric and Vinicius Junior after the break gave Real hope, but there was no escape for the competition’s most decorated side despite a dramatic finale.
Federico Valverde thought he had hit a stoppage-time leveller but after a check at the pitchside monitor referee Srdjan Jovanovic disallowed the goal for offside.
Club legend Zinedine Zidane won the Champions League in each of his first three seasons in charge of Real, but his decision to rest players with next Saturday’s El Clasico against Barcelona in mind was a rare, and huge, aberration.
Without captain Sergio Ramos – left in the stands with a knee injury – Real’s defence was a mess and could do little to prevent Mateus Tete and Manor Solomon scoring either side of a Raphael Varane own goal.
Former Tottenham midfielder Modric hit a stunning long-range strike to bring a ray of hope and, although Vinicius scored within 15 seconds of coming, on Shakhtar held on for a famous result.
‘We’re experiencing a nightmare’
Castro was asked in his pre-match news conference whether the game should have been called off thanks to their depletion, with the former Porto boss admitting “at the moment we’re experiencing a nightmare.”
Instead it was a first-half dream for his fearless team which contained eight players under the age of 23. Captain Marlos had already wasted a glorious chance to put Donetsk ahead when Tete did drive past Thibaut Courtois after some woeful defending from Varane and Marcelo.
Varane then toed into his own net after Courtois failed to hold a Tete shot, and Solomon swept in a fine third after some slick one-touch play had carved Real apart.
Real sent on the rested Karim Benzema at the break and got a foothold in the game when Modric scored a wonderful goal, arrowing a 25-yarder into the top corner.
The comeback was well and truly on when Vinicius scored with his first touch, sweeping in after a defensive lapse.
Shakhtar were camped in defence but had chances to seal it on the counter, Tete twice wasting good chances and Marlos seeing a fourth ruled out for offside.
There was more offside drama to come. Valverde’s shot from a short corner beat 19-year-old goalkeeper Anatolii Trubin, but Vinicius was offside, right in his eyeline and the goal was chalked off.
After a summer which saw no incoming transfers, Zidane now has work on his hands to qualify from a group which also contains Inter and Borussia Monchengladbach.
He can make more history though – as no side has won the Champions League after losing their opening game.