Djokovic is 2-0 at the season-ending tournament, and will retake the top ranking from Andy Murray if he does better this week.
Murray is 1-0 so far, and plays his second match on Wednesday against Kei Nishikori.
Djokovic never looked at ease in his second match at the O2 Arena, but he was able to hang on through two tough tiebreakers to earn the victory.
The second-ranked Serb saved three break points in the first set, and managed to go up a break twice in the second set but Raonic responded each time.
Raonic, a Canadian who reached the Wimbledon final this year, led in both tiebreakers but couldn’t hold on.
Djokovic earned only 11 winners in the match, compared to Raonic’s 42, but it was still enough to get him through and on track to win a record-tying sixth title at the year-end championship.
In the early match, Dominic Thiem went through another second-set letdown before putting things right to give himself a chance to advance.
The eighth-seeded Austrian, who is making his debut at the season-ending tournament, held on to beat Gael Monfils 6-3, 1-6, 6-4, making him 1-1 in the round robin.
In his opening match on Sunday, Thiem lost to Djokovic after winning the first set. In the second set of that match, he was blanked 6-0.
“I tried to avoid the mistake I did in the first match, to drop a little bit. Didn’t really happen that good,” Thiem said. “But I was trying to stay tough in the third set.”
He got some help this time, though.
Although Monfils improved in the second set, winning all three of his break points to force a decider, his service game never really got going. In the final game of the match, the Frenchman gave it away with three of his five double-faults.
“It was a tough one,” said Monfils, who is still recovering from a rib injury that forced him out of the Paris Masters at the end of last month. “I think I didn’t play a great match, but I gave everything I had.”
Because of his injury, Monfils said he may pull out of his final match against Djokovic.
The winner of the match between Thiem and Raonic on Thursday will also reach the semifinals.
Watch ATP Tour Finals live on Tennis Channel