It was the Serb's third consecutive title in the California desert, breaking a tie with four-time champion Roger Federer, who lost to Djokovic the past two years in the final and skipped this year because of a knee injury.
The women's final was equally one-sided.
Victoria Azarenka defeated error-prone Serena Williams 6-4, 6-4, returning Azarenka to the world's top 10 for the first time since August 2014.
Djokovic needed an hour, 17 minutes to dispatch Raonic, whose big serve got broken five times. The 25-year-old Canadian served just four aces and had 27 unforced errors. His first serve averaged 128 mph - much faster than Djokovic's 111 mph - but he connected on only 55 percent. The Serb landed 68 percent of his first serves and was never broken.
More From This Section
Trailing 5-1, Williams won three straight games and held two break points on Azarenka's serve in the last game. But Williams ended the match with three straight errors.
"Just unexpected nerves maybe. I definitely didn't expect to be on that stage again," said Williams, who was back at Indian Wells after ending her 14-year boycott last year.
It was Azarenka's first victory over the top-ranked Williams since the Cincinnati final in August 2013. She will move up seven spots to No. 8 in the WTA Tour rankings Monday.
"I have to go for it," Azarenka said. "She's not a type of player that if you're going to play safe she's going to give it to you or she's going to miss. You really have to go out there and take away because there is nothing coming easy."
Williams was bidding to become the first woman to win
The crowd reacted harshly and their father Richard said he heard racial taunts.
"Obviously the last time I was there was probably the worst moment of my whole career. Not probably. Sure," Williams said. "To be back out there, which I never thought I would be, was really different and special. I was overwhelmed with emotions and nerves."
Azarenka and Williams met for the 21st time in their careers, with Williams now owning a 17-4 edge. The only player she has faced more in her career is her older sister, who watched grim-faced from a box after losing early in her return to Indian Wells for the first time since 2001.
"It was so great for our sport to see them both here," Azarenka said.
Williams was warmly welcomed back last year only to withdraw with a knee injury before her semifinal.
"Thank you so much for the cheers," Williams said. "I can't tell you how much it means to me."
Williams playfully stuck out her tongue as she walked past Azarenka posing with the winner's crystal trophy on her way off the court.