Hearts suffered a fourth defeat in five games as St Mirren won for the first time under new manager Oran Kearney.
Adam Hammill's two second-half goals – the first struck from 35 yards – earned the Paisley club three vital points in their fight to stay clear of the Ladbrokes Premiership's relegation zone.
Consequently, Hearts lost their place as joint leaders in the league table after Celtic claimed victory at Hamilton. The defeat continues a depressing run of results for the Edinburgh club, who have now not scored a goal in any of their last five fixtures.
They enjoyed the majority of possession throughout the 90 minutes without creating many clear scoring opportunities. When defender Arnaud Djoum did find the net with a header in the second half, it was ruled out for offside to compound a difficult afternoon.
St Mirren were without the injured Anton Ferdinand and their ineligible Hearts loanee Ryan Edwards for this encounter. They promoted on-loan goalkeeper Danny Rogers from the substitutes' bench following Craig Samson's decision to retire and join Sunderland as goalkeeping coach. The visitors restored Sean Clare to their starting line-up at a venue where they hadn't recorded a league win for eight years.
Hearts striker Steven MacLean had a fine scoring chance at the back post in the opening minutes, but he sent Callumn Morrison's cross into the side-netting with a first-time shot. The Edinburgh side tried to play passing football out from defence but found themselves harried aggressively by St Mirren whenever their midfielders or forwards received the ball.
The hosts enjoyed some success from incisive counter-attacks, mainly down their right flank. Paul McGinn charged down that side to fasten onto Hammill's intelligent flick in behind the Hearts defence on 20 minutes. As he shaped to shoot inside the penalty area, only a last-ditch sliding tackle by the on-loan Burnley centre-back Jimmy Dunne thwarted him.
On the opposite side after 33 minutes, Kyle Magennis forced himself in front of Clevid Dikamona to collect a loose ball on the edge of the Hearts penalty box. He steadied himself before dispatching a rasping drive which beat Zdenek Zlamal but clattered off the goalkeeper's crossbar.
The closest those in maroon came to breaking the deadlock in the first period was on 38 minutes. Both centre-backs stayed forward after a free-kick was only partially cleared, and from Dikamona's delivery Dunne's looping header was headed off the goal line by Magennis at the back post.
Play then swung back towards Zlamal's goal and the Czech had to produce a brilliant parry in the dying moments of the first half. Stephen McGinn capitalised on Dunne's hesitance to steal possession and shoot from close range, but Zlamal beat his effort away.
Hearts replaced Craig Wighton with Jake Mulraney during the interval, however they found themselves behind within a minute of the restart. Paul McGinn's lofted pass was controlled by Hammill 35 yards from goal. The forward then turned and hit a dipping volley which caught Zlamal by surprise as it flew over him and into the net.
Hammill took only nine minutes to double the advantage. Paul McGinn arrived in the Hearts penalty box but took a heavy touch controlling a cross from the left. The ball bounced for McGinn to stroke it into the net with an instinctive first-time finish from around eight yards. That left Hearts with the proverbial mountain to climb.
Djoum's header hit the net but was disallowed for offside, then came loud penalty appeals from the 1,537 travelling fans claiming Michael Smith's cross had struck Alfie Jones' arm. Referee Craig Thomson was unmoved. Zlamal was called into action again to use his fingertips to push Paul McGinn's hooked shot onto the crossbar and over for a corner.
Hearts did plenty pressing during the final 15 minutes as cross after cross arrived in the St Mirren box. MacLean made another penalty appeal after appearing to be impeded going past Jack Baird, but it simply wasn't Hearts' afternoon.
St Mirren (4-4-2): Rogers; Hodson, Baird, Jones, Erhahon; P McGinn, S McGinn, McShane, Magennis; Hammill (Smith 71), Jackson (Mullen 84). Unused subs: Lyness, Cooke, Willock, MacPherson, Eckersley.
Hearts (4-1-3-2): Zlamal; M Smith, Dikamona, Dunne, Garuccio (Mitchell 62); Haring; Morrison, Clare (Lee 54), Djoum; Wighton (Mulraney 46), MacLean. Unused subs: Doyle, Bozanic, Cochrane, Bozanic, Godinho.
Referee: Craig Thomson.