Substitute Stephen Simmons kept Hearts in pole position for a UEFA Cup place with a second-half strike which settled an engrossing encounter.
It came just as Hearts were losing their way in a game they had led through a Kevin McKenna goal until Motherwell hit back in the second half and threatened to nab all three points.
But the victory, if not wholly deserved, gives the Edinburgh side a comfortable cushion in third place.
Motherwell were first to threaten when a clever back-heel from Dave Clarkson set up Keith Lasley but his shot was beaten out by Tepi Moilanen.
But chances were few and far between in a lively first half that threw up only a handful of goalmouth opportunities.
Francois Dubourdeau did not have a direct shot to save until the 23rd minute when he did well to clutch an Andy Webster header after Jean Louis Valois had delivered the corner.
McKenna then headed narrowly wide from an Alan Maybury cross as Hearts stepped up the pace.
The breakthrough came in the 29th minute when Gary Wales set up McKenna and he scored with a stunning left-foot shot from the edge of the penalty area.
The game erupted ten minutes from the break when Maybury and Stephen Pearson were booked after squaring up to each other and both managers were also lectured by referee Mike McCurry after Craig Levein and Terry Butcher had exchanged angry words.
Motherwell came close to equalising two minutes before the break when a James McFadden free kick was turned past his post by Moilanen.
Seven minutes into the second half, the Fir Park side were level when Lasley accepted a pass from Shaun Fagen and lobbed the ball over Valois before volleying home.
Motherwell dominated after this but Moilanen made fine saves from Tony Vaughan and Clarkson before McFadden wasted a great chance in the 70th minute when he shot carelessly over with only the goalkeeper to beat.
But Hearts snatched the lead against the run of play a minute later when Phil Stamp raced clear on the left and his cross was turned in by Simmons for what proved to be the winner.