Devin Booker returned from a four-game absence to put up 23 points, nine assists and eight rebounds as the leaders of the West toppled the top side in the East.
The Suns, who are 53-13 for the season, have now beaten all other 29 teams in the same season for the first time since 2006-07.
"I told the guys it was one of the best defensive performances I've ever seen," said Suns coach Monty Williams after watching his team concede just 35 points in the second half. "I've been around for a little bit."
Duncan Robinson was top scorer for Miami with 22, who led by 11 in the early stages before falling to just their third defeat in 15 games.
"They were first to the ball a lot," said Robinson. "They were the aggressor. Unacceptable."
The Milwaukee Bucks are now two games behind the Heat at the top of the Eastern Conference after beating the Atlanta Hawks 124-115, with Giannis Antetokounmpo's double-double of 43 points and 12 rebounds firing them to a sixth-straight win.
Antetokounmpo finished 15-of-22 from the field to take his tally to 82 points in the space of 24 hours after his 39 in Tuesday's victory over the Oklahoma City Thunder.
"The things he does are not normal," said team-mate Bobby Portis. "It's fun to be his team-mate and fun to play alongside him."
Rockets stun Lakers in overtime
The Los Angeles Lakers lost for the ninth time in a row on the road, going down 139-130 in overtime against the Houston Rockets.
A triple-double from LeBron James and 30 points from Russell Westbrook were not enough as rookie Jalen Green hit a career-high 32 points for the Rockets.
"We have a really small margin of error this season and teams are making us pay," said James, whose run of consecutive 25-point games ended at 23. "I missed a lot of shots that I know I'm capable of making, have made throughout the course of the season and my career."
The Los Angeles Clippers snapped their two-game losing streak, beating the Washington Wizards 115-109, while the Utah Jazz improved to 41-24 with a comfortable 123-85 win over the Portland Trail Blazers.
Bulls back on track, Beasley sets record
The Chicago Bulls ended a run of five consecutive losses, DeMar DeRozan scoring 36 points, including 16 in the fourth quarter, in a 114-108 win over the Detroit Pistons.
It was a day to remember for Malik Beasley, who set a franchise record for three-pointers in the Minnesota Timberwolves' win at home over the Thunder.
Beasley landed 11 of his 17 attempts from beyond the arc as Minnesota, seventh in the West, made it six wins in a row.
The Boston Celtics continued their recent good form with a 115-101 win at the Charlotte Hornets, while the New York Knicks pulled off a fifth-straight road win over the Dallas Mavericks, Julius Randle scoring 26 points in a 107-77 blowout.
Gregg Popovich will have to wait for his NBA record 1,336th regular-season win as coach, the San Antonio Spurs falling 119-104 at home to the Toronto Raptors.
There were also wins for the Orlando Magic, who topped the New Orleans Pelicans 108-102, and the Denver Nuggets, who beat the Sacramento Kings 106-100 thanks to a 38-point double-double from Nikola Jokic.