Goals in either half from Andy Halliday and Liam Boyce saw Robbie Neilson's men extend their perfect start to the season.
Jim Goodwin's side got a goal back late on through Joe Shaughnessy then finished the game with 10 men when Kristian Dennis was shown a straight red card moments later.
Goodwin had made two changes from the team that had drawn with Dundee on opening day. Jay Henderson and Ethan Erhahon both dropped to the bench, replaced in the starting line-up by Richard Tait and Greg Kiltie.
Hearts, in turn, made just one switch following their win over Celtic. Peter Haring was handed a start with Stephen Kingsley dropping out altogether due to illness.
It was the visitors who had the first chance after a cagey start. Michael Smith picked out Boyce with a cross from the right and the striker's header dropped just wide of the target.
St Mirren responded with a Curtis Main shot on the turn that shaved the outside of the post.
But it was Hearts who claimed the lead after 16 minutes, Boyce teeing up left wing-back Halliday who lifted a neat shot beyond Jak Alnwick.
Tait then hit the Hearts crossbar with a header but referee Gavin Duncan had blown anyway for a foul earlier in the move.
From a Jamie McGrath corner, St Mirren captain Shaughnessy then headed over the Hearts crossbar.
The Tynecastle side had further chances of their own before the half was out but both were spurned by Gary Mackay-Steven, while a half-hearted St Mirren penalty appeal for a trip on Tait was waved away.
The home side opened the second half pushing for an equaliser and Craig Gordon clutched two stinging Eamonn Brophy efforts in quick succession.
Kiltie then found no takers with a great ball across the face of goal before Main's volley went narrowly wide.
Hearts had hardly been in the second half as an attacking force but doubled their lead with a rare foray forward after 73 minutes.
Mackay-Steven fed Boyce who cut onto his right foot before unleashing a shot that beat Alnwick for power.
St Mirren gave themselves a lifeline when Shaughnessy headed Scott Tanser's cross beyond Gordon.
But any chance of a comeback effectively ended seconds later when substitute Dennis was shown a straight red card for smashing into Haring.