The Jambos maintained their slender advantage in a three-way tussle to win the Scottish Premiership despite falling behind early in the second half at Tynecastle.
Defending champions Celtic remain three points behind after grinding out a 1-0 win over St. Mirren, while Rangers are now four points off the top but have a game in hand away to Falkirk on Sunday.
Hearts have led the way almost all season as they look to become the first side outside of Celtic and Rangers to win the title in 41 years.
Their lead has eroded in recent weeks due to a four-game winless run away from home.
However, their form at fortress Tynecastle has their noses in front heading into the final five games of the campaign, where the league splits into two and the top six face off to decide the destiny of the title.
Emmanuel Longelo's opener five minutes into the second period had Motherwell on course to end Hearts' unbeaten home record this season.
But Claudio Braga's overhead kick levelled on the hour mark.
Captain Lawrence Shankland kept his cool from the penalty spot on 87 minutes after on-loan Celtic defender Stephen Welsh caught Landry Kabore.
And Kabore then rounded off the scoring in stoppage time.
Celtic remain in the hunt for a 14th title in 15 years despite a series of unconvincing performances.
Former Arsenal and Liverpool midfielder Alex Oxlade-Chamberlain struck the only goal as Martin O'Neill's men edged past relegation-threatened St. Mirren.
However, Celtic have home advantage against both Rangers and Hearts in the post-split fixtures and know they will almost certainly retain their title by winning all their remaining five matches.
