Hearts faced up to life without skipper Steven Presley with a first victory in over two months.
And the architect of Motherwell's defeat was Portuguese midfielder Bruno Aguiar, who made two and scored with a cracking free-kick of his own.
Hearts had taken the lead after nine minutes when full-back Takis Fyssas ran on to Neil McCann's clever through ball to slip a low finish in off the post.
But Hearts' defensive problems were in evidence as Motherwell hit back quickly through Richie Foran.
David Clarkson was given acres of space down the right and the Irishman had all the time in the world to knock home his cross from eight yards.
But Hearts did look the more likely to score again albeit it came through an own-goal from the luckless Paul Quinn. Aguiar's dangerous free-kick was heading into Colin Meldrum's hands, until Quinn flicked the ball into the opposite corner to give Hearts the advantage back.
And the game was beyond Motherwell when Andrius Velicka raced on to Aguiar's long pass and chipped a delightful finish over Meldrum.
Aguiar capped his own excellent performance with the pick of the goals after 64 minutes.
His free-kick from 25 yards was delivered with power and accuracy and Meldrum hardly moved as the ball flashed past him.