The reigning NBA MVP had been bidding to become only the second player in history after Wilt Chamberlain to score at least 30 points in 30 consecutive games as the Rockets hosted the Mavs.
But Harden’s run of 30-point games looked to be in serious jeopardy after a dogged performance by the Mavericks, who often double-teamed the Rockets ace in an attempt to staunch his scoring ability.
With around three minutes remaining, Harden looked to be in trouble with only 20 points against his name.
However back-to-back three pointers took him to 26 points with 1:57 on the clock, and he moved to 28 points after two free throws with just over a minute remaining.
With the Toyota Center home crowd roaring him on, Harden broke the 30-point barrier with a three-pointer to finish with 31 points on the night.
Harden is now one game shy of Chamberlain’s tally of 31 consecutive 30-point games for second place on the all-time list. Chamberlain also holds the outright record with a streak of 65 30-point games.
Gerald Green had 19 points off the bench for the Rockets while Chris Paul and Kenneth Faried had 17 apiece.
Luka Doncic led the Dallas scoring with 21 points.
Elsewhere Monday, Kawhi Leonard drained the game-winner with 4.4 seconds left with a 30-point display as the Toronto Raptors outlasted the Brooklyn Nets with a 127-125 victory on Tuesday.
Leonard, who had averaged just over 17 points per game in his previous four appearances, went 50 percent from the field to lead the scoring for the Raptors.
The win boosted the Raptors to 42-16, to see them keep pace with the Milwaukee Bucks at the top of the Eastern Conference.
Leonard was one of six Raptors players to make double figures, with Serge Ibaka adding 18 points and Pascal Siakam 17 points.
New arrival Marc Gasol added 16 points from the bench in his 22 minutes on court.
Brooklyn, who fell to 29-29 with the defeat, were led by the in-form D’Angelo Russell with 28 points.
Russell, who is gearing up for his All-Star debut next week, also had a mammoth 14 assists and seven rebounds but ultimately was unable to drag his team over the line.
Joe Harris had 24 points for Brooklyn while Allen Crabbe had 22 off the bench.
In Chicago meanwhile, Giannis Antetokounmpo warmed up for the All-Star week with a 29-point haul to help Milwaukee power to a 112-99 win over the Bulls.
Antetokounmpo also had 17 rebounds and eight assists in the win which sees the Bucks remain on top of the Eastern Conference with 42 wins and 14 defeats.
Oklahoma City Thunder meanwhile had a 47-point performance from Paul George at the centre of their 120-111 win over the Portland Trail Blazers.
George was backed with yet another triple-double night from Russell Westbrook, who had 21 points, 14 rebounds and 11 assists.