"Our defense was there when we needed it to be," Durant said. "We got stops and made shots."
Harden narrowly missed his second straight triple-double, finishing with 10 rebounds and eight assists.
"When he's at that level, he makes us go," Brooklyn's Blake Griffin said about Harden. "We, as a team, can go to a different level."
Harden missed his first seven shots from beyond the arc before connecting with 4:34 left to play the fourth, extending a seven-point Nets lead to double digits. He added two more from distance in the final quarter.
"James was special there in the fourth," Durant said.
Griffin had 14 points and 11 rebounds, and Patty Mills scored 13 points to help Steve Nash earn the victory in his first game in his home country as an NBA head coach.
"That means a lot," Nash said. "This is a very special place for me. Not only Canada, but Toronto. I've spent so much of my time here, I have so many close friends, relationships, and memories in this city. For me, this is definitely a sweet win."
Durant reached 20 points for the 10th straight game, extending both his career-best streak to begin a season and the Nets' record for 20-point games at the start of a season.
"Like we said since Day 1, he's been unbelievable this season at both ends of the floor, rebounding, scoring, facilitating" Nash said.
Durant was playing in Toronto for the first time since tearing his left Achilles tendon while playing for Golden State in Game 5 of the 2019 NBA Finals.
"The last time I was here was one of my lowest moments as a basketball player," Durant said. "It's good to come back here playing and see the fans again."
The 11-time All-Star shot 11 for 18, going 3 for 6 from 3-point range, and 6 for 6 at the free throw line. He had seven rebounds and seven assists.
Fred VanVleet scored 21 points, OG Anunoby had 16 and Gary Trent Jr. scored 15 points for the Raptors, who have lost two straight after winning the previous five.
Toronto (7 for 25) matched its season-low with seven made 3-pointers. The Raptors also had seven in their season-opening loss to Washington.
Raptors forward Pascal Siakam made his first start of the season after missing the first 10 games because of left shoulder surgery. Siakam scored 15 points in 25 minutes. He shot 5 for 12.
"My legs were heavy," Siakam said. "I was out of breath after about three minutes."
Toronto led 60-53 at halftime, but Brooklyn reclaimed the lead with a 9-0 run to begin the third that was capped by a 3-pointer from Griffin. Durant scored 13 points in the quarter and Griffin had seven as the Nets took an 88-77 lead to the fourth.
Nets: F James Johnson (left knee) was inactive. ... The Nets won consecutive games against Toronto for the first time since February and April, 2015.... Griffin said he expects to play in the second half of Brooklyn's back-to-back at Chicago tomorrow night.
Raptors: Siakam replaced Precious Achiuwa in the starting lineup. ... C Khem Birch (right knee) was inactive. ... Toronto shot 2 for 11 from 3-point range in the first. ... For the second straight game, the Raptors didn't attempt a free throw in the first quarter. ... Toronto waived F Sam Dekker Saturday. ... Rookie Dalano Banton celebrated his 22nd birthday.
HITTING THE ROAD
Toronto plays eight of its next nine games away from home.
Nash represented Canada at the 2000 Summer Olympics and was general manager of Canada's men's national team from 2012 to 2019.
Nets: At Chicago on Monday night.
Raptors: At Boston on Wednesday night.
KD and Harden combine for 59 to propel Nets past Raptors
Kevin Durant drops a game-high 31 points, and James Harden adds 28 of his own to help the Nets down the Raptors.