The world number two, chasing the only grand slam title to elude him, next meets 18th-seeded Latvian Ernests Gulbis.
A couple of double faults in the 11th game put Raonic under pressure and Djokovic took full advantage, grabbing the opening set after unsettling his opponent with a dipping backhand.
The Serb, who now has a 3-0 record against Raonic, then took the second-set tiebreak when his rival missed a backhand.
The Canadian trailed 4-0 in the third set before retrieving one of the two breaks of serve.
Djokovic, however, ended the contest on his first match point when Raonic, the first Canadian male to reach the last eight of a grand slam in the professional era, sent a forehand wide.
"It is complicated to play against him because he has a great serve, powerful and accurate, difficult to anticipate," said Djokovic in a courtside interview.
"It was important to be mentally strong and consistent."
The world number two, who has only reached the final here once before when he lost to eight-times champion Rafa Nadal in 2012, dropped his serve just once, in the final set when victory was virtually assured.
"He is a very good player and to beat Roger and Berdych is impressive," said Djokovic. "He has been playing his best tennis, it will be difficult for me."
Follow the French Open on up to 7 courts LIVE on Eurosport Player
- Sports & Recreation
- Ernests Gulbis