John Sutton’s 30th minute penalty and a late David Templeton strike separated the two sides with Saints’ striker Gregory Tade shown a red card for a scuffle in the box six minutes before half-time.
Both sides had decent chances during the first-half but for large spells of the second period it was the 10 men of St Johnstone who threatened.
The hosts could have been ahead after only 10 minutes when Andrew Driver’s deep corner was headed back across goal by Ryan McGowan but experienced full-back Callum Davidson was well positioned to hack clear off the line.
Saints’ strikers Tade and Nigel Hasselbaink were both lively in the opening exchanges and the former almost embarrassed Hearts captain Marius Zaliukas when he robbed him of possession on the edge of the penalty area before seeing his cross cleared.
A minute later it was Hasselbaink who nearly got the better of the Jambos defence.
He picked out Liam Craig on the left-flank and then met the former Falkirk winger’s cross at the near post but his header drifted across goal.
Callum Davidson again kept the scores level when he threw himself
in front of Driver’s close-range effort after some good work from David Templeton.
In an end-to-end first-half it was the visitor’s turn to threaten once more as Chris Millar’s deflected cross fell to Craig at the far post but he ballooned his first-time effort over the bar.
Hearts again came close after 25 minutes when Darren Barr rolled a free-kick into the path of teenage defender Callum Paterson who saw his thunderous effort rattle the crossbar with Alan Mannus well beaten.
It did not take long for Hearts to take the lead as Templeton’s mazy run into the St Johnstone penalty area saw him evade a number of challenges before being brought down by David Mackay.
Sutton stepped up confidently and sent Mannus the wrong way to give Hearts the lead on the half-hour mark of a largely even contest.
Things went from bad to worse for Saints manager Steve Lomas when Tade was sent off eight minutes after his side had gone behind.
The former Inverness striker clashed with Hearts defender Andy Webster inside the hosts’ penalty area and was shown a straight red card after a prolonged discussion with referee Stevie O’Reilly.
Lomas introduced new signing Rowan Vine from the bench but the goal and the dismissal put Hearts firmly on top as they dominated the closing moments of the first-half.
Hearts opened the second-half still on top with McGowan firing high and wide after latching onto Sutton’s mis-timed flick.
But after 50 minutes Zaliukas failed to control McHattie’s thrown-in and the ball squirmed behind for a St Johnstone corner and the away side then enjoyed a spell of sustained possession.
With the Perth side fully on top Craig had two chances in a matter of moments to equalise. First he came close with a long range effort that only just cleared the bar and shortly afterwards he should have done better when he was picked out inside the area but fired straight at Jamie MacDonald.
The 10 men were really pushing to draw level and, after Hearts failed to clear a corner, Hasselbaink’s effort beat MacDonald but was cleared off the line by Sutton.
The lively Hasselbaink came close again with 20 minutes left on the clock when he wriggled free inside the area and forced a smart save out of MacDonald.
Hearts boss John McGlynn introduced Lithuania winger Arvydas Novikovas in the 72nd minute and the former St Johnstone loanee needed less than a minute to sting the palms of Mannus.
Having seemingly weathered the Saints attacking storm Hearts set about trying to put the result beyond doubt and Mannus had to be at his best again to palm away a fiercely-struck Templeton free-kick.
The important second goal for Hearts came with eight minutes remaining as Templeton controlled Mehdi Taouil’s pass before curling a low effort inside Mannus’ far post.
Paterson again came close to a goal when he climbed at the back post and powered a header towards goal that was again clawed out by the busy Mannus.
St Johnstone visibly tired towards the end of the game as their unsuccessful period of pressure for the early period of the second-half clearly took its toll on the 10 men.
Substitute Dale Carrick almost rounded the game off in superb fashion for Hearts in injury time but after cutting inside his effort was just too high.