He dominated at the net, winning 21 of 25 points.
Federer, who leads the ATP this season with five titles - including two grand slams - improved his 2017 record to 34-2 as he bids for a 94th career trophy.
Now ranked 143rd in the world after a win in a lower-level Challenger event only three weeks ago in Gatineau, Que., Shapovalov will crack the top 70, possibly to 66th, for reaching the semifinals. He would need to win here and have an equal or better finish than Rafael Nadal at the Western & Southern Open in Cincinnati next week to become the World No.1 on August 21.
Unseeded Argentine Diego Schwartzman posted a odd win over American Jared Donaldson 0-6, 7-5, 7-5 to advance to a quarterfinal meeting with Robin Haase, the 52nd-ranked Dutchman who upset seventh-seeded Grigor Dimitrov of Bulgaria 7-6 (3), 4-6, 6-1.
It will be just the second career meeting between the two.
He is 1-0 against Haase - a straight-sets win in Davis Cup play in 2012.
After shock wins over Rafael Nadal and Juan-Martin del Potro, Shapovalov's dream run continues, coming from a set down to defeat Adrian Mannarino 2-6 6-3 6-4. Haase said it was hard for both players after playing tough three-set matches against seeded players earlier in the week. Shapovalov also upset former US Open victor Juan Martin Del Potro in the second round.
Bolt loses world race; still fan favorite
The United States, with Gatlin running the second leg, won the first heat in a world-leading time of 37.70 seconds. In a spirit of forgiveness an arbitration panel gave Gatlin the opportunity to compete again.
Fourth seeded Alexander Zverev defeated South Africa's Kevin Anderson 7-5, 6-4 to set up a clash with Shapovalov.
Shapovalov became the youngest player to reach the tournament's quarterfinals since Bjorn Borg in 1974.
In a doubles semifinal, seventh-seeded Rohan Bopanna of India and Ivan Dodig of Croatia defeated sixth-seeded Raven Klaasen of the Netherlands and Rajeev Ram of the United States 4-6, 7-6 (8), 11-9.
Federer, who is playing his first tournament since winning his eighth Wimbledon title, struggled a bit at the beginning of his Thursday match against Spanish veteran David Ferrer and was forced to play three sets.
Wozniacki next faces Sloane Stephens after the American beat Czech Lucie Safarova 6-2, 1-6, 7-5.
The second-seeded Federer continued his mastery over 12th-seeded Roberto Bautista Agut of Spain with a 6-4, 6-4 victory.
Meanwhile Wozniacki rediscovered some of her vintage form as she sealed a semifinal berth with a marathon 7-5, 6-7 (3/7), 6-4 victory over Pliskova.
- Global stocks slide as US-North Korea nuclear tensions rise
- Missile incoming? Head underground, Guam tells residents
- Dolphins' Tannehill out for season
- David Moyes has a very blunt assessment of Paul Pogba
- N. Korea rejects talks with South
- Eggs containing pesticides found in 17 countries
- Arsenal gun down Leicester in seven-goal thriller — EPL
- Trump Calls Guam Amid North Korea Tensions, Says: 'You Are Safe'
- Letting Obamacare implode might be Trump's least popular position yet
- $393M winning Mega Millions ticket sold in IL , lottery officials say