Cengiz Under's goal and a string of Alisson saves in a 2-1 away first-leg defeat had kept Roma in the tie, and Eusebio Di Francesco's men edged to victory in the return to reach the quarter-finals despite a dismal display in which Dzeko's winner was scarcely deserved.
Indeed, despite needing only a draw to themselves reach the last eight on Wednesday, this was no backs-to-the-wall job for Paulo Fonseca's Shakhtar as they sought to enjoy themselves at Stadio Olimpico.
Chances were few and far between, though, and a lack of cutting edge in the final third was ruthlessly punished by Dzeko seven minutes after half-time.
Shakhtar's desperation for the away goal they now required left gaps in defence and Ivan Ordets was dismissed for halting a late Roma breakaway, Alisson holding on for a fourth consecutive home Champions League clean sheet to seal the hosts a place in the draw for the last eight.
It took Dzeko just 22 seconds to work Andriy Pyatov for the first time, but Shakhtar would not bow easily to the hosts' early pressure and were soon knocking the ball around with confidence in the Roma half.
Alessandro Florenzi flicked a risky backwards header just wide of his own goal and a nervous home crowd witnessed the visitors maintaining a level of control throughout the first half, Pyatov intercepting when Aleksandar Kolarov led a rare Roma foray.
Taison flashed a 25-yard effort over the top, before Federico Fazio recovered in time to force Facundo Ferreyra wide having cheaply given up possession to his fellow Argentinian.
Kolarov then crucially swept the ball away from Ferreyra's toe inside the Roma box as the sides went in level at the break.
Roma did not initially improve from the restart but, when the Shakhtar defence switched off the first time, a clear chance finally fell for Dzeko and he made no mistake.
Kevin Strootman hooked a hopeful pass forward to set his team-mate away, Dzeko in the clear and reaching the ball ahead of Pyatov to prod a finish through the goalkeeper's legs.
Diego Perotti fired straight at Pyatov as Roma chased a second and Dzeko then almost struck again with a wonderful curling shot that just faded wide, before Shakhtar redoubled their efforts.
Fred recycled the ball and Taison danced by challenges, but they could not muster the necessary response and tempers flared as Ordets tugged back Dzeko to see red with 11 minutes remaining, Ferreyra clashing with a ball boy to earn just a yellow as Roma held on.
Key Opta Facts:
- Roma have reached the quarter finals of the Champions League for the third time in the club's history and for the first time since 2007-08.
- This is the first time Roma have progressed from a knockout tie in which they have lost the first leg; ending a run of five consecutive knockout tie defeats.
- Roma have kept a clean sheet in each of their last four Champions League home games, winning the last three (W3 D1 L0).
- Shakhtar Donetsk however, have lost seven of their last eight Champions League away games (W1 D0 L7).
- Shakhtar Donetsk failed to register a single shot on target against Roma in this match.
- Iven Ordets red card was the second Shakhtar have received in the competition this season - as many as in their previous four Champions League campaigns combined.
- Edin Dzeko has had a hand in 55 per cent of Roma's 11 goals in the Champions League this season (4 goals, 2 assists).