Hearts bounced back from consecutive Scottish Premier League losses with a 1-0 home win over Motherwell on Sunday.
Losses to Kilmarnock and Celtic saw Hearts slip down the table, with victory against Motherwell essential for John McGlynn's men.
The visitors started brightly, with Jamie Murphy going close inside the first minute, but Hearts were also lively in attack with Andrew Driver's 20-yard effort just going wide.
The game's only goal was scored after 14 minutes when English defender Danny Grainger unleashed an unstoppable 25-yard strike.
Grainger's effort nestled into the top corner and gave the hosts the initiative in front of more than 11,000 fans at Tynecastle.
Ryan Stevenson and Callum Paterson had opportunities to double the lead for Hearts but it was Motherwell who were better in the second half.
They could have levelled when midfielder Nicky Law had his header cleared off the line by Andy Webster in the dying stages of the match, but Hearts held on for all three points that saw them climb to eighth on the table.