Heffernan became the second Kilmarnock player to score a hat-trick at Tynecastle this season, matching the absent Cillian Sheridan's tally from earlier in the campaign.
The striker gave his side a 1-0 half-time lead, before a six-minute second-half double settled the contest.
The win moves Kenny Shiels' side into fifth after winning their third league win in four.
The only blip in that time frame occurred on Wednesday night when an injury time equaliser from Borja Perez rescued a point from the away trip to Inverness.
The Spaniard had scored after being set up by James Dayton and it was the winger who was at the heart of everything positive Kilmarnock did in attack from this fruitful visit to the capital.
The match had been an intriguing, if unimaginative, spectacle, in the first half. Both sides were committed to building from the back with short passing, but each team was fully aware of the others side's intentions and it made for few highlights until Heffernan broke the deadlock.
Dayton retrieved an over-hit pass from the opposite flank before whipping a left-footed cross into the six-yard box for Heffernan to nod home.
Gorgie's new favourite, Liverpool loanee Michael Ngoo, had cut an isolated figure in the first half and Hearts boss John McGlynn responded by bringing on fellow striker John Sutton at half-time and switching to a 4-4-2.
The change temporarily had the desire effect on the pattern of play with the hosts carving out a flurry of meaningful chances in the opening 15 minutes following the restart.
Cammy Bell had to be quick to push away a Scott Robinson shot from 20 yards before fisting away a Fraser Mullen's free-kick two minutes later.
With Hearts throwing bodies forward for a succession of set-pieces Kilmarnock almost doubled their advantage on the counter-attack. Billy King's poor touch allowed Heffernan and Dayton a two-on-one against the covering Callum Tapping. Heffernan carried until playing in Dayton for the shot which Jamie McDonald was able to push away for a corner.
Substitute Sutton then had his first chance to make an impact. He was picked out by a Mullen free-kick but Jerome Tesselaar just did enough in leaning into the striker and forcing an off balance header that flew over the bar.
Hearts would rue those missed chances as the visitors doubled their lead three minutes later. Dayton's corner from the left was headed back across goal by William Gros and Heffernan was on hand again to smash the ball into the corner of the net with a shot on the turn.
The hosts almost had an immediate route back into the match but Ngoo's close range header was scrambled clear on the line by James Fowler.
Any doubt about the security of the away side's lead was obliterated on 71 minutes when Heffernan secured his hat-trick.
Exploiting the space created by Hearts pushing further up the park, Perez was played in for a shot on goal by Heffernan. He saw his low shot saved superbly by McDonald but the rebound fell kindly for the English striker to stroke into the unguarded net.