DeRozan went 3-of-4 from 3-point range and Rudy Gay supplied a double-double of 26 points and 10 rebounds as the Raptors stay hot in the season's closing week.
Toronto led by 21 points in the first half but only secured the win when it held off a late Nets charge, which saw them pull to within two with 4 1/2 minutes left.
DeRozan and Gay took over at that point, combining for 15 points down the stretch.
The loss locked them into the fourth seed in the Eastern Conference.
'How to Train Your Dragon 2' releases 5-minute clip
Yosemite climber falls 30 feet, suffers major injuries