He will next face 11th-seed Tomas Berdych, while the other semifinal will feature No. 7 Marin Cilic against the surprising 24th-seed, American Sam Querrey.
Djokovic, who had the chance to regain the No1 ranking if he won the title, now that Andy Murray was out of contention, had struggled throughout the first set against an opponent he had beaten 25 times in 27 previous matches, but ongoing shoulder and elbow problems proved too much for the Serb.
Defending champion Murray led by a set and a break but was troubled by a hip injury as he lost 12 of the last 14 games to go down 3-6 6-4 6-7 (4-7) 6-1 6-1.
Djokovic, a three-time champion at the All England Club, did say he would think about taking time away from the tour because of an injured right elbow that became so painful Wednesday he stopped in the second set of his quarterfinal against Tomas Berdych.
Murray, one of five men over 30 in the last-eight, faces big-serving Sam Querrey bidding to make his eighth Wimbledon semi-final in the last nine years.
Playing in his 100 career match at Wimbledon, Federer wasted no time making Raonic play from behind. He is in the Wimbledon semi-finals for the second successive season after a poor year at the Slams in which he exited the Australian Open in the third round and Roland Garros after two matches. That was the most defeating thing'. All three guys are taller and stronger than I am. "But as I've said, it was only getting worse", Djokovic said. At the end I have to take the court I get scheduled on.
Raonic, runner-up to Murray past year, is bidding to make the semi-finals for the third time.
So yeah, anything is possible, but it would still be a massive surprise if Federer doesn't advance to his 11th Wimbledon final.
Andy Murray and Novak Djokovic may be battered and bruised but Roger Federer has handed them the blueprint to keep playing into their mid-30s - take a risk, take a break. Failing to convince at the net was developing into a worrying pattern for the 26-year-old, who failed to get another volley off in the third game before just managing to hold on to see it out.
While Day 10 promises to be an action-packed day with the women's semi-finals, let's take a close look at some of the off-court highlights from Day 9 of Wimbledon 2017.
"This year I'm just a normal tennis player again". I'm very touched, actually, to have so much support.
Djokovic, the current world No. 4, defeated Adrian Mannarino of France, 6-2, 7-6 (7-5), 6-4, to reach the Wimbledon Quarter-Final.