St Mirren missed the chance to jump up to fourth spot in the Premiership after a fruitless Friday night trip to the capital.
In front of a packed Tynecastle, the Buddies were comfortable throughout the first half but found themselves behind at the break after a slick move saw Barrie McKay curl the hosts in front.
The Saints pressed hard for a second half leveller, with Hearts keeper Zander Clark pulling off a superb double save to deny both Greg Kiltie and Curtis Main.
Despite a gusty overall performance from the Paisley side, the hosts managed to hold on to strengthen their grip on third spot - with St Mirren staying in sixth.
Saints went into the game without suspended trio Marcus Fraser, Ethan Erhahon and Charles Dunne, with full-back Ryan Strain injured.
Thankfully the Paisley side did have one personnel boost at Tynecastle with experienced centre back Declan Gallagher passed fit enough to start, with recent recruit Richard Taylor handed a tough-looking first start in the stripes.
After an uneventful opening 10 minutes the Buddies were presented with an excellent chance to break the deadlock. After a Ryan Flynn corner broke down, the ball eventually fell to Curtis Main who curled an effort meekly at Clark with the goal at his mercy.
The Saints were more than holding their own in the capital and fashioned another opportunity when Alex Greive cleverly cut inside his marker and set up Keanu Baccus. The Australia international fired wide from the edge of the box as the visitors continued to impress.
St Mirren keeper Trevor Carson had been a virtual spectator in the opening 20 minutes but he was alert to snuff out Lawrence Shankland's header from a pinpoint Robert Snodgrass free-kick.
Baccus was extremely unfortunate to go into the book after Snodgrass took a tumble without any contact at all.
The Paisley side had been coasting in the capital but on the half hour mark Hearts produced a devastating first linked-up attack of the evening.
Some slick passing and movement that started on the left wing culminated in Andy Halliday feeding McKay on the edge of the box. The tricky winger wasted no time in pulling the trigger, curling a sweet strike past Carson to open the scoring.
The Saints didn't have their troubles to seek as Mark O'Hara went down injured shortly after. He was quickly replaced by Kiltie, with the already depleted visitors now sweating on another key player's fitness.
Taylor put in a crucial block on Shankland as the striker looked set to fire his side further ahead after another rapid attack by the Jambos.
Alex Cochrane saw his fierce drive blocked away for a corner as the Buddies battled to stay just one behind at the break.
Gallagher went into the book early in the second half for trying to wipe McKay out as he burst into the Saints half.
Hearts were pressing hard for a second to forge further ahead and, after another solid Taylor block in the box, Ginnelly cleared the bar from a promising position when he should have hit the target.
Snodgrass went into the book for a dangerous lunge on Baccus, with the atmosphere finally starting to boil up in the capital.
Saints were very much still in the game, with Flynn's low cross eventually breaking to Kiltie. Despite space opening up nicely the playmaker blasted over the bar.
St Mirren turned to striker Jonah Ayunga and youngster Dylan Reid off the bench as they continued to press for a leveller.
The returning forward almost did the trick within two minutes, with Ayunga's angled low drive tipped desperately onto the post by Clark.
The Jambos threw on new signing Garang Kuol for the last 15 minutes, the highly-rated teenager having just signed on loan from Newcastle United.
Robbie Neilson was sent after picking up a second booking, much to the delight of the vocal St Mirren support.
The Buddies were knocking on the door and Hearts had their keeper Clark to thank for keeping his side in front after he made a sublime double save from Kiltie and Curtis Main. Ayunga then lashed into the side netting as the visitors continued to press for a late equaliser.
Stephen Robinson sent striker Eamonn Brophy on for the last five minutes to try and finally unlock the door.
The Saints thought they'd finally found a way back into the game with a dramatic late VAR check for a penalty after a serious handball shout. The spot kick wasn't given though, with the hosts eventually holding on for all three points - Main's late free-kick dragging agonisingly wide at the death..
READ MORE:
Don't miss the latest Renfrewshire headlines - sign up to our free daily newsletter here