For all the Heat were able to get from their backcourt, including a career-high 30 points from Richardson and 30 from Dragic, there was no overcoming the 41 points of Harden, who was supported by the 22 points of backcourt partner Chris Paul.
"Their two best players stepped up and did what great players do down the stretch," Spoelstra said, with Harden's 41 the most against the Heat this season. "When we made even half a mistake, they made us pay."
The Heat also got 16 points and 17 rebounds from center Hassan Whiteside in falling to 0-2 on this three-game homestand.
The loss left the Heat just one game from falling out of an Eastern Conference playoff seed.
"It's not like we're relaxing right now," Dragic said. "Nobody is going to help us."
The Rockets also were shorthanded, without reserve guard Eric Gordon and starting forwards Ryan Anderson and Trevor Ariza. That had forwards Luc Mbah a Moute and P.J. Tucker in Houston's starting lineup, along with Clint Capela, Harden and Paul.
As with the teams' previous game this season, the Heat found themselves positioned for the upset, this time up by the 87-85 early in the fourth quarter, before Houston scored the next nine points.
From there, Richardson matched his career high in points and 3-pointers with a 3-pointer to draw the Heat within 94-90, only to see his 3-pointer matched by one from Paul.
But with Harden converting a 3-pointer with 2:50 to play, Houston was able to push to a 104-94 lead. Another Harden 3-pointer, with 2:03 to play, made it 107-94, effectively ending it.
The Heat briefly moved into the lead in the third quarter before going into the fourth down 83-80, with Paul scoring the Rockets' final seven points of the third.
Like us on Facebook
Harden was up to 28 points by then, with Dragic with 24 and Richardson with 22.
The Rockets entered 33-2 this season when carrying a lead into the fourth.
With Dragic scoring 10 consecutive points at one stage late in the second period and closing the quarter with 13, the Heat trimmed what had been a 17-point deficit in the period to a 61-57 halftime deficit.
Harden was up to 23 points by the intermission, with Dragic with 20 at that stage.
Harden loaded up with 16 first-quarter points, shooting 7 of 8 from the line in the period, helping to stake Houston to a 35-24 lead heading into the second period.
The game concluded the two-game season series.
The Heat, playing in the injury absences of Dragic and Tyler Johnson, built an early 14-point lead in the season's first meeting with the Rockets, on Jan. 22 at the Toyota Center, before Paul and Harden rallied Houston to the 99-90 victory. Harden closed with 28 points in the victory, with Whiteside contributing 22 points and 13 rebounds in the loss, but also with seven turnovers.
The Heat entered having won seven of their previous eight home games against the Rockets.
The Heat were seeking to avoid only their second two-game sweep at the hands of the Rockets since 2008-09.
The Heat were coming off Monday's 111-109 loss to the shorthanded Magic.
The Heat caught Houston on the second night of a back-to-back set, with the Rockets coming off a Tuesday victory in Brooklyn.