The Jambos appear doomed to relegation, but they are not going down without a fight as Jamie Hamill’s controversial penalty secured the points after Marc McAusland had been sent-off.
The visitors snatched the lead after just 29 seconds as Conor Newton’s inviting cross was headed into the corner by Steven Thompson.
But St Mirren’s joy was shortlived as Callum Paterson (5) latched onto David Smith’s deflected cross and nodded the ball past Marian Kello.
Paterson could have added to his tally soon afterwards but Kello’s superb reaction save kept out his close-range header, while the other goalscorer Thompson fired wide at the opposite end.
The Buddies began to get a grip on the game and McAusland’s header hit the bar before Newton nodded narrowly wide of the net.
But the match turned in the home side’s favour after the break as McAusland appeared to be harshly penalised for a challenge on Dale Carrick and Hamill (52) slotted in the resulting spot-kick.
St Mirren still mounted a fightback, despite the loss of McAusland, and Jim Goodwin’s free-kick tested Jamie MacDonald, while Thompson flicked over the bar.
Carrick should have wrapped up the points for Hearts but he slid the ball against the post and St Mirren nearly punished this miss as Thompson volleyed over in the dying stages.