The 18-year-old needed a close tie-break as he defeated the world number two 3-6, 6-4, 7-6 to advance to the last eight.
Shapovalov, who earlier this year made headlines for striking an umpire, also made history as he is now the youngest Masters 1000 quarter-finalist ever while he also boasts the distinction of being the second youngest player to defeat Nadal after Borna Coric.
The world number 143 already beat Rogerio Dutra Silva and former US Open champion Juan Martin Del Potro and will now face France's Adrian Mannarino in the quarter-final on Friday (11 August).
As for Nadal, the performance was a big blow, not only as he failed to break Shapovalov six times in the third set but also missed the chance to regain his world number one ranking.
If the Spaniard had reached the semi-final stage in Montreal, he would have been guaranteed to return to the summit of tennis following world number one Andy Murray's withdrawal from the event due to injury. Instead, he will now have to win in Cincinnati to overtake the Briton.
However, world number three Roger Federer could take top spot well. If the Swiss ace wins the Rogers Cup and goes on to win the Cincinnati Open, he will become the new world number one ahead of the US Open.
Federer can also take confidence from the fact that he has already defeated Nadal three times, including two finals in the calendar year, if they are to face in Cincinnati.
The 19-time Grand Slam winner most recently extended his record against Spain's David Ferrer to 17-0 and will face another Spaniard in Roberto Bautista Agut on Friday in the Rogers Cup quarter-final.
The other quarter-final matches on Friday include a clash between Holland's Robin Haase and Argentina's Diego Schwartzman as well as the talented German Alexander Zverev taking on South Africa's Kevin Anderson.