Westbrook, the NBA's leading scorer, had 30 points, matched a career high with 17 assists and grabbed 11 rebounds for his seventh triple-double of the season and 15th of his career.
Enes Kanter had 21 points and 12 rebounds and Serge Ibaka had 21 points and five blocks for the Thunder, which remained alone in eighth place in the Western Conference standings.
The Thunder shot 51% from the field and outrebounded the Raptors, 49-33.
A power dunk by DeRozan cut Oklahoma City's lead to 106-104 with 15.4 seconds to play. Westbrook made two free throws with 14.3 seconds to play to make it a four-point lead. DeRozan missed a contested three-pointer, and the Thunder held on.
Toronto led by seven in the second quarter before the Thunder rallied. A dunk by Ibaka on an assist by Westbrook cut the Raptors' lead to 59-58, but Toronto maintained a 61-58 lead heading into the break. DeRozan led the Raptors with 16 points in the first half. Oklahoma City shot 56% before the break, but turned the ball over 10 times.
Westbrook clinched the triple-double on a rebound with just over a minute left in the third quarter. Steven Adams' jumper in the lane as time expired in the period gave the Thunder an 86-79 lead and Westbrook his 15th assist.
at San Antonio 116, Chicago 105: Tony Parker had a season-high 32 points in leading the Spurs to their fifth straight victory. Kawhi Leonard added 20 points, Patty Mills had 15 points and Manu Ginobili 14 for the Spurs. Pau Gasol had 23 points and Aaron Brooks added 22 to lead Chicago.
Utah 95, at Brooklyn 88: Gordon Hayward scored 24 points, including five straight to stop a Nets rally, and the Jazz beat Brooklyn. Former Nets forward Derrick Favors added 22 points and eight rebounds for the Jazz, which won for the seventh time in nine games and finished off a 3-1 trip in which it was a second away from being perfect.
Charlotte 108, at Detroit 101: Al Jefferson scored 24 points and the streaking Hornets beat the Pistons in a matchup of Eastern Conference playoff hopefuls. The Hornets have won five straight to strengthen their bid for a postseason berth, while Detroit has dropped six in a row.
at Orlando 103, Boston 98: Tobias Harris and Maurice Harkless combined for 16 points in the fourth quarter and the Magic beat the Celtics. Victor Oladipo scored a game-high 22 points for the Magic, which trailed by 20 early before recovering to win its second straight.