The Wizards had grabbed a 112-110 lead with 4 second left on John Wall's two free throws, but the Rockets responded quickly.
On the ensuing possession, Trevor Ariza fouled Harden away from the ball before it could be inbounded, and the Rockets star connected on a free throw, cutting the deficit to one point.
Houston got the ball back and Harden (35 points, six rebounds, six assists) knifed through Wizards' defense from the top of the key for the game-winning basket.
Washington's Kevin Seraphin missed a last-chance jumper at the horn, and the Rockets emerged with a seventh straight win entering the all-star break.
Dwight Howard added 24 points and 16 rebounds.
Ariza finished with 32 points and 11 rebounds, Bradley Beal contributed 20 points and Wall supplied 19 with 14 rebounds for the Wizards.