The two sides will contest the Scottish Communities League Cup final next month - and Danny Lennon's side struck a psychological blow ahead of that contest with this comfortable victory.
Paul McGowan netted from the penalty spot after three minutes and Carey's impressive breakthrough extended their lead on the stroke of half-time.
Saints earned two early corners, the first of which was headed behind by Darren Barr. Barr was involved in the next corner and this time he was adjudged to have felled Lee Mair, resulting in referee Kevin Clancy pointing to the spot. McGowan stepped up and despatched the ball past goalkeeper Jamie MacDonald, who dived the wrong way.
Hearts responded at the other end and Craig Samson had to parry away Jamie Walker's fizzing shot on the angle.
Barr received the first booking of the match for carelessly fouling Carey, before Michael Ngoo worked Samson with a low shot from the edge of the box. However, it was the hosts who looked the more likely to add to the scoring and Sam Parkin should have done better when he met Carey's delivery.
On the stroke of half-time St Mirren did manage to double their lead and it came in stunning fashion, Carey looping a shot over the helpless MacDonald from 25 yards out.
Hearts boss John McGlynn introduced John Sutton and Dylan McGowan in place of Ardvydas Novikovas and Barr for the start of the second half. McGowan headed wide from Walker's corner and the striker had a big shout for a penalty when he was hauled down in the box by Mair, however Clancy ignored the appeals.
Carey could not beat MacDonald with a second strike from distance on 56 minutes and Hearts had their best chance of the opening hour when Samson parried Walker's shot to Sutton, who could not quite turn the ball into the net.
After offering very little in the first half, the double substitution at half-time seemed to breath new life into the visitors, although they continued to find scoring opportunities difficult to come by. Kevin McHattie had a drive from distance in the final minute of injury-time comfortably gathered by Samson and St Mirren held out to leapfrog their opponents in the table.
- Sports & Recreation
- Darren Barr
- Craig Samson
- Jamie Walker