Meanwhile, clay king Nadal was relieved to be back winning as he builds towards the French Open, racing to a 6-1, 6-0 victory over Bosnian Damir Dzumhur.
Nadal, who is aiming for an eighth title in the Italian capital, looked in imperious form as he saw off Dzumhur in just 61 minutes.
Shapovalov was ranked 143rd in the world when he defeated Nadal at the Rogers Cup last August, but the Spaniard proved far too good on his favoured surface of Rome as he set up a quarter-final against Fabio Fognini.
Fognini battled hard to reach the quarters, coming from 2-4 down in the opening set to beat German Peter Gojowczyk 6-4 6-4.
The Spaniard will next take on Fognini, a player he holds a 10-3 record against including five straight wins in their most recent matches. Fifth seed Juan Martin del Potro emerged a 7-5, 6-3 victor over Barcelona runner-up Stefanos Tsitsipas and Miami Open champion John Isner was edged 7-6 (5), 6-7 (2), 6-7 (5) by Albert Ramos-Vinolas.
The 16-time Grand Slam victor next takes on either Canadian Denis Shapovalov, 19, or Robin Haase of the Netherlands.
When Thiem netted a service return two points later to end it, the White Stripes' Seven Nation Army was blasted over the stadium sound system and the crowd began singing along in an atmosphere that more closely resembled a soccer game than a tennis match. I also had control, more or less, of a high percentage of the points.
PayPal to buy Swedish payments group iZettle for $2.2bn
The move boosts PayPal's in-store presence at a time when competition in the online payments sector is increasing. The company forecast reaching EBITDA profitability by 2020 on a standalone basis.
Gaza killings: Palestine Solidarity Day being observed in Pakistan
US Ambassador Nikki Haley on Tuesday condemned Hamas provocation and said ally Israel had acted with restraint. It said there had been 40,000 and that half of them were affiliated to Hamas.
Local rally held for those who couldn't go to Raleigh
They held up signs advocating for their cause, some of which played on memes or popular culture. "Veteran teachers are pretty much falling through the cracks".
"After a loss in Madrid, it's important to come back strong".
Defending champion Alexander Zverev of Germany kept his title defence on track but needed eight match points to see off Briton Kyle Edmund 7-5, 7-6 (13/11). "That was the way that I want to play".
Elsewhere, fifth seed Juan Martin Del Potro retired hurt while 6-4, 5-4 down against ninth seed David Goffin, while Marin Cilic eased past Benoit Paire 6-4, 6-4.
Halep needs to reach at least the quarterfinals or risk losing the top spot to Caroline Wozniacki.
The Romanian, a finalist in Rome previous year, is on her way to holding on to top spot as she next plays France's Caroline Garcia who dumped out US Open champion Sloane Stephens 6-1, 7-6 (9/7).
Dane Wozniacki was given a scare by Latvia's Anastasija Sevastova before closing out the match 6-2, 5-7, 6-3. He then stunned Madrid finalist Dominic Thiem, surviving a mid-match resurgence from the Austrian to advance a 6-4 1-6 6-3 victor.
The victor will play Anett Kontaveit, who ousted 1999 victor Venus Williams 6-2, 7-6.