Edin Dzeko scored the only goal of the match early in the second half as Roma became the second Italian side to progress to the final eight after Juventus beat Tottenham last week.
Shakhtar led 2-1 from the first leg and would have advanced with a draw, but its hopes of an equalizer diminished 11 minutes from time when defender Ivan Ordets was sent off for hauling down Dzeko.
It is the first time in 11 years that two Italian teams are in the quarterfinals, with the draw taking place Friday.
"Going through and being among the strongest teams has to be a source of great pride," Dzeko said. "I don't have a preferred opponent: they are all strong teams, but we will play to win against anyone. We are among the eight strongest teams in Europe, it means we are strong too."
In the night's other match, Sevilla knocked out Manchester United with a 2-1 win at Old Trafford to go through with the same score on aggregate. Substitute Wissam Ben Yedder scored twice after coming on in the second half, with Romelu Lukaku pulling a goal back for United.
Roma hadn't conceded in its three Champions League matches at the Stadio Olimpico this season but nearly netted an own goal when Alessandro Florenzi tried to head clear a free kick but sent the ball flashing across the face of goal.
Shakhtar dominated possession early and Taison almost scored but his effort flew narrowly over the crossbar.
But Roma broke the deadlock seven minutes after the break as Dzeko latched on to Kevin Strootman's ball over the top and slotted it into the bottom right corner.
That gave Roma confidence and it almost doubled its lead 10 minutes later but Dzeko fired narrowly wide.
"What I liked best is that we played like men and that's the most important thing if we want to aspire to certain goals and dreams," said Roma coach Eusebio Di Francesco, in his first ever Champions League campaign.
"I want to continue to dream with this team ... the only adversary I want to avoid is fear. We should never have that, we should be consicious of our means. The team is growing a lot."
A small scuffle between players broke out 10 minutes before full time after Facundo Ferreyra pushed a ballboy over the advertising boards when trying to retrieve the ball from him. Ferreyra was shown a yellow card.
Dzeko was given a standing ovation when he was substituted in the final minute.
"The standing ovation has to be for the whole team, not just for me. Everyone gave their all and we are deservedly in the quarterfinals," Dzeko said. "I didn't want to leave (in January) precisely because of matches like these, you play all season for matches like these."
More AP Champions League soccer coverage: https://apnews.com/tag/ChampionsLeague
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.