The 12-time grand-slam champion is striving to return to the top of the rankings in London after he was dislodged by Andy Murray and has looked very much a man on a mission this week, winning both matches to top Group Ivan Lendl.
Djokovic was given a major test by Raonic, but the defending champion came from behind in both tie-breaks to make it eight wins out of eight against the world number four with a 7-6 (8-6) 7-6 (7-5) victory at the O2 Arena on Tuesday.
While Djokovic, aiming to claim the title for a fifth consecutive year, is assured of a place in the last four, the big-serving Raonic can join him with a win over Dominic Thiem in his final round-robin match at the season-ending tournament.
Djokovic was slow to get going in his win over Thiem on Sunday and had to save three break points in his first two service games as a fired up Raonic piled on the early pressure.
They proved to be the only opportunities for either player to claim a break during an opening set in which both men were sold in defence and strong on serve, so it took a high quality tie-break for the second seed to get his nose in front.
Raonic led 3-1 in a topsy-turvy breaker, but Djokovic fought back and came up with a sublime backhand lob to earn a first set point before a double fault from the Canadian put the favourite a set up.
The Australian and French Open champion broke in the first game of the second, then again to lead 3-2 after Raonic broke back with a forehand pass but the Serb was pegged back at 4-4 when he netted a forehand.
Raonic had a chance to level the match when he earned a set point at 6-5, but tamely netted and Djokovic showed the resilience of a champion to claw his way back in a second breaker to celebrate yet another win when his opponent was off target with a backhand.