It was a game in which luck deserted the Steelmen, with a hugely fortunate deflected opening goal for the visitors followed by two unstoppable strikes.
Hearts - backed by a boisterous away support - had the best early chance when Tony Watt’s fine run led to a shot which was blocked by Stephen McManus.
But it was the hosts who almost took the lead on 20 minutes when Craig Clay’s shot was somehow kept out by Hearts keeper Jack Hamilton low to his right and Ryan Bowman sliced the rebound wide.
Scott McDonald had made a promising start to the match and he volleyed just wide after Stevie Hammell’s throw-in on the left.
Louis Moult then set up McDonald’s next chance on 40 minutes, but his shot from 18 yards was easily blocked by Hamilton at his near post.
There was an anxious moment for ‘Well at the other end when defender Ben Heneghan’s slice from Walker’s cross could have flown into the net but instead went harmlessly through to his keeper Craig Samson.
Hearts took the lead in fortuitous circumstances on the stroke of half-time after Samson had missed a cross and then Keith Lasley gave the ball away. Sam Nicholson’s poor effort on goal was then deflected into the ‘Well net off McManus.
Walker had a shot deflected just wide early in the second half before Motherwell had a goal chalked off when McDonald shot home after an initial effort by him had hit the bar and Moult’s follow up was blocked.
Great work by Craig Clay then set up McDonald but he sclaffed the ball over.
Walker had a shot saved by Samson low to his right before Igor Rossi blasted over the ‘Well bar but Hearts did go two up in spectacular fashion when Calum Paterson rifled the ball in with his left foot from 18 yards.
McDonald’s left footed shot went inches past the Hearts left post before the visitors almost went three up when Watt’s left footed effort hit the inside of the right post and was kept out by Samson.
But Hearts did score again when a corner fell to Arnaud Djoum and he shot home brilliantly from the edge of the penalty area.
‘Well kept trying until the end and scored a consolation goal a minute into injury time when substitute James McFadden shot home a glorious free-kick.