Djokovic, who injured a side muscle during a five-set win over Taylor Fritz on Friday and suggested he might not be able to continue, showed hints of discomfort on the way to becoming the second male player to reach 300 Grand Slam match wins, Reuters reported.
Fourteenth seed Raonic had never previously taken a set off Djokovic in three previous Grand Slam meetings so when he snatched the second set a surprise looked possible.
But Djokovic, bidding for a record-extending ninth title in Melbourne, responded by raising his level and improving his record over Raonic to 12-0.
The Serb will face Germany’s Alexander Zverev for a place in the semifinals.
After the drama of Friday when Djokovic said he had sustained a “tear” and could not move, this was a relatively routine day at the office for the world number one who has been on painkillers for 48 hours.
“It was good enough to compete, to play, I wouldn’t be standing here talking if I wasn’t in sufficient condition to get on the court and give myself a chance to win a match,” Djokovic told Eurosport.
“It’s not ideal, I’ve felt better that’s for sure. Didn’t have much preparation and didn’t hit a tennis ball since two night ago. There was a cloud of doubt whether I would play but it’s a Grand Slam and I gave everything to have a chance.”
Serena Williams also stormed into the quarterfinals with a gritty 6-4, 2-6, 6-4 victory over Belarusian Aryna Sabalenka.
The match was a big test for Williams, who was up against one of the few players on the women’s tour capable of matching her power from behind the baseline.
“I’m happy to get through that one,” Williams said in an on-court interview. “It wasn’t easy and I knew it wasn’t going to be easy. She was teeing off on every shot.
“Even the games that I lost were super close, one shot here and one shot there, and I just felt like, ‘Serena you’ve got this, you’ve just got to keep going.’”
The players went toe-to-toe in an even first set until Williams pounced late to break Sabalenka for the first time and take a 1-0 lead.
The roles were reversed at the start of the second, however, with Sabalenka breaking Williams in her first two service games.
The American, who is chasing a record-equaling 24th Grand Slam title, clawed a break back but was powerless in the face of Sabalenka’s onslaught as the seventh seed broke once more for a 4-1 lead before sending the match into a decider.
“I lost the second set but the games were so close so I just tried to stay in there,” Williams added.