Shapovalov had earlier produced a relentless display of big-hitting to deny France’s Benoit Paire the perfect 29th birthday present with a 7-6(5) 4-6 6-4 victory.
Raonic edged a tight clash against an opponent he had only beaten once before, with Bulgarian Dimitrov struggling to build up momentum ahead of the French Open later this month.
Briton Kyle Edmund beat Russia’s Daniil Medvedev 6-4 6-0 to set up a second-round clash with Novak Djokovic.
The Serb showed signs of a return to form after a difficult year, eliminating Kei Nishikori on Monday, but Edmund said he was not thinking about the 12-time grand slam champion’s game.
“I don’t care, I’m just going to go out there and play my game, I can’t be worrying about him,” said Edmund.
“There are hundreds, so many players to be worrying about (whether) they’ve turned a corner. I think the person who’s playing the best on clay at the minute is Rafa (Nadal).”
Top seed Nadal, chasing his sixth Madrid Open title, opens with a second-round match against Gael Monfils on Wednesday.
DEL POTRO SHINES
World number six Juan Martin del Potro started with a 6-3 6-3 win over Bosnia’s Damir Dzumhur to reach the third round. The Argentine saved two of three break points, with 19 winners and 20 unforced errors, to set up a clash with Dusan Lajovic.
“On clay, he’s a very powerful player, he plays a very intelligent game,” Del Potro said of the Serbian. “It’s going to be a tough match, like all of the matches on clay for me. I will just try to play a little bit better than today.”
Croatia’s Borna Coric upset ninth seed Pablo Carreno Busta 6-4 6-2 in the opening round. Coric fought back from 4-3 down to win five straight games en route to his second straight win over the Spaniard, who he beat at the Qatar Open earlier this year.
Coric was leading 5-2 in the second set when heavy rain interrupted play at Caja Magica, and after a 40-minute delay, he returned to complete his 16th match win of the season.
Dutchman Robin Haase snapped a four-match losing streak to record the 200th match win of his career, defeating South Korean Chung Hyeon 6-2 6-0 in the other first-round match.