The world No 1 skipped practice on Saturday after suffering what he described as a muscle tear on his right side during his five-set victory against American Taylor Fritz on Friday.
But Djokovic, chasing a record-extending ninth men’s singles title in Melbourne and third in a row, beat the Canadian 14th seed 7-6 (7-4) 4-6 6-1 6-4 in their 12th meeting after a largely uninhibited performance on the Rod Laver Arena.
The 33-year-old Serbian will meet Alexander Zverev in the last eight on Tuesday after the German overcame 23rd seed Dusan Lajovic of Serbia 6-4 7-6 (7-5) 6-3.
Djokovic began the match moving freely and it was Raonic who saved break points at 3-3 and 4-4, before the top seed began grimacing and touching his abdominal muscles in discomfort.
But the 17-time Grand Slam champion sealed the first set in a tiebreak after 56 minutes following a series of unforced errors from the Raonic racket.
After both players traded opportunities to break early in the second set, Raonic underwent a medical timeout for an issue to his right ankle when trailing 1-2.
Raonic resumed to promptly seal the first break of the match and remained resolute on serve to win just his fourth ever set against the tournament favourite.
Djokovic overcame the setback to claim a double break lead as he raised his level to clinch the third set in just 29 minutes.
Raonic then showed good resolve to stave off two break points early in the fourth set but Djokovic sealed the crucial break of serve after a backhand error from his opponent to lead 5-4 and he closed out victory.