The 31-year-old Nadal will face Italian Fabio Fognini in the last eight as he looks to retake the world number one ranking from Roger Federer by winning an eighth Rome title this week.
Nadal has already won his 11th titles in Monte Carlo and Barcelona during the current clay-court season, but has lost in the quarter-finals in each of the last three years in Italy.
He was far too strong for Shapovalov, taking the opening set with a break in the seventh game before racing through the second to gain a measure of revenge for his shock defeat by the 19-year-old in Montreal last year.
"I think Rafa played incredible today," said Shapovalov. "He's been playing at a really high level for this whole clay season. So, you know, it's credit to him. He was just simply too good today."
Top seed Nadal recorded his 20th clay-court win of the year while Shapovalov will at least have the consolation of becoming the Canadian number one on Monday.
"It was a solid match for me," said Nadal. "I started with some mistakes on the return. But with my serve, I didn't lose many points.
"At the beginning, I really think that he was serving big. I got the break in the 3-all. And then the match changed. He probably stopped to serve that big a little bit, and I was a little bit more relaxed."
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.
Fognini got past Germany's Peter Gojowczyk 6-4, 6-4.
Meanwhile, Djokovic moved into his first quarter-final since Wimbledon last July when he defeated Spain's Albert Ramos-Vinolas 6-1, 7-5.
The four-time Rome champion is making his way back this year after a six-month injury absence before the Australian Open, which was followed by elbow surgery.
"It felt good," said the 12-time Grand Slam winner. "I've historically always played well in Rome, and I feel like each match is getting better."
The 30-year-old set up a clash with Japan's Kei Nishikori for a semi-final berth.
Germany's Alexander Zverev, who beat Djokovic in last year's final, kept his title defence on track but needed eight match points to see off Briton Kyle Edmund 7-5, 7-6 (13/11).
For Zverev it was an 11th consecutive win after back-to-back title runs at Munich and Madrid.
The 21-year-old will play Belgian David Goffin who advanced when Argentine fifth seed Juan Martin del Potro retired while trailing 6-2, 4-5 with a groin injury.
- Halep, Sharapova advance -
In the women's tournament, Simona Halep boosted her bid to retain the world number one ranking as the top seed advanced to the quarter-finals after American Madison Keys withdrew injured with a painful rib.
The Romanian, a finalist in Rome last 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).
Halep needed to reach at least the last eight and go further than world number two Caroline Wozniacki to retain the top ranking going into the French Open.
Dane Wozniacki was given a scare by Latvia's Anastasija Sevastova before closing out the match 6-2, 5-7, 6-3.
She next plays Estonia's Anett Kontaveit who defeated Venus Williams for the second time in a week.
Kontaveit, 22, won through 6-2, 7-6 (7/3) against the 37-year-old American who was seeded eighth in a tournament she won nearly two decades ago in 1999.
Three-time winner Maria Sharapova ousted Daria Gavrilova 6-3, 6-4 and will play fifth seed and French Open champion Jelena Ostapenko who saw off Britain's Johanna Konta 2-6, 6-3, 6-4.
Defending champion Elina Svitolina of Ukraine fought back from a first set wipeout against Daria Kasatkina to win 0-6, 6-3, 6-2.