The Scotland cap broke the deadlock 10 minutes after the restart before Suso Santana added a second with an audacious back-heel two minutes later.
In a frenetic period, Hamilton winger Marco Paixao brought the Accies back into the game with a cool finish after taking advantage of Marius Zaliukas’ slack defending in the 62nd minute.
The visitors made a confident start to proceedings as they had Hearts pegged back in their own half but it was the Gorgie outfit who conjured the first chance in the fifth minute.
Jose Goncalves picked out winger Suso at the back post but the Spaniard failed to make proper contact and the ball bounced tamely wide.
Moments later Hearts striker David Witteveen swung wildly at a loose ball that went high and wide.
Accies created their first opening in the 15th minute with a route-one long ball to Mickael Antoine-Curier but the on-loan Dundee player’s far-post shot was blocked by Goncalves.
From Richard Hastings’ corner, Janos Balogh’s attempted clearance fell to Paixao but the ball ricocheted off the Portuguese player’s legs and fell wide.
A lacklustre first-half performance from the hosts contributed to a subdued Tynecastle atmosphere but a Suso solo run that came to nothing had the home supporters encouraging their team on.
Uganda international David Obua should have done better with a free header from Craig Thomson’s corner after he missed the target from close range.
Goncalves then powered a header off the crossbar in the 33rd minute after connecting with Thomson’s outswinging corner and Ismael Bouzid was out of reach of the follow-up as he tried to net the rebound.
Stewart gave away a free-kick 20 yards from goal after clattering into James Wesolowski and Hastings’ free-kick was deflected just wide of alogh’s goal.
Hamilton finished the half the stronger as Antoine-Curier then blasted wide after latching onto Simon Mensing’s through pass.
Just three minutes into the second half Suso looked to make an impact with a curling effort from the edge of the box but Tomas Cerny pulled off a fine diving save.
Hearts took control of the game with two goals in as many minutes that left the visitors shell-shocked.
The first arrived in the 55th minute through Stewart from the penalty spot. The midfielder played a quick free-kick to Witteveen and the Austrian was adjudged to have been fouled by Martin Canning after rounding the defender.
Stewart made no mistake from 12 yards with a clinical shot into the corner and the home side then doubled their lead minutes later courtesy of Suso.
Thomson’s corner was headed down to the winger by Bouzid and he back-heeled the ball over the line right in front of the goalkeeper.
Hamilton winger Paixao reduced his side’s arrears in the 62nd minute. The midfielder nipped in to collect Grant Evans’ pass ahead of Zaliukas before applying a cool finish from close range.
Despite the disappointment of losing a goal to their opponents, Hearts continued to press as they looked to put the game beyond doubt.
Hearts brought on winger Arvydas Novikovas for goalscorer Suso and the Lithuanian winger was in the thick of the action right away.
The hosts had claims for a penalty waved away by referee Alan Muir after Novikovas fell in the box under a challenge from Hastings.
Moments later Novikovas created space on the edge of the box but he dragged his shot wide.