Durant exited late in the third quarter with a right knee issue after Jimmy Butler fell on him, but the Nets did enough without him to improve to 27-13 overall and second spot in the Eastern Conference. Brooklyn have won 18 of their last 20 games.
Butler put the Heat ahead 101-100 with a dunk with 1:12 remaining, but O'Neale had the final say with a putback after Kyrie Irving had missed a 30-foot three-point attempt.
Irving top scored for Brooklyn with 28 points, including six-of-15 from three-point range with six assists, while Nic Claxton contributed strongly again with 13 points, 11 rebounds and three blocks.
Durant managed 17 points on five-of-11 shooting from the field with five rebounds in his 30 minutes on the court.
Butler top-scored for the Heat with 26 points, but shot nine-of-21 from the field with two turnovers, while Tyler Herro finished with 24 points before limping off late.
Bam Adebayo was also limited by a right-hand contusion, scoring 10 points with eight rebounds.
Harden records triple-double in 76ers win
James Harden recorded a triple-double and became the 27th NBA player with 24,000 career points as the Philadelphia 76ers beat the Detroit Pistons 123-111.
Harden finished with 20 points on seven-of-14 shooting, including three-of-five from beyond the arc, 11 rebounds and 11 assists.
Suns slump to sixth straight loss
Mitchell, who scored a season-high 71 points in last weeks' OT win over the Chicago Bulls, made seven-of-12 from the field, while Garland dished off seven assists in a fine display.
The Suns were missing their backcourt of Chris Paul and Devin Booker but were within one point at three-quarter time before fading.
Duane Washington top scored for Phoenix in 25 minutes off the bench with 25 points including five triples.