The substitute fired home in the 58th minute after Inverness were again exposed on the break, although they suffered an unfortunate run of the ball.
And the Irishman's clever back-heel with five minutes left ensured Caley Thistle have now lost as many games in those eight days as they had in the rest of the season, with their Scottish Communities League Cup semi-final defeat by Hearts followed by a league defeat at St Mirren.
They also lost key attacking pair Richie Foran and Andrew Shinnie to injury in the first half, with central midfielder Ross Draper missing through injury from the start.
Kilmarnock also lost a key player when Cillian Sheridan limped off, but that only saw the introduction of Heffernan.
Manager Kenny Shiels had kept faith with most of the youngsters he brought in for the midweek defeat by Celtic, with Mark O'Hara keeping his place at the base of a midfield diamond ahead of club captain Manuel Pascali.
Shiels, along with several players and 500 fans, had warmed up for the game on Friday with a special appearance from Marie Osmond, whose 1973 hit Paper Roses was adopted as the club's theme.
And they began on a high note when they carved out a chance for William Gros but the striker shot wide.
Kilmarnock kept the pressure on and Sheridan's cutback found Ross Barbour, but his shot was blocked by a crowd of Inverness players.
Foran and Gary Warren fell just short of meeting Aaron Doran's free-kick and the Irishman was hurt as the pair landed together. Foran tried to play on but he soon went down again clutching the back of his left knee and was replaced by Philip Roberts in the 16th minute.
Much of the game was now being played in the Kilmarnock half but the hosts were showing the ability to break well.
One counter-attack allowed Sheridan to run in from the left but Josh Meekings covered well to ensure the striker's shot was easily saved by Ryan Esson, who was making his first appearance since September following a groin injury.
Caley Thistle suffered their second blow on the half-hour mark when Shinnie pulled up holding his left hamstring.
On-loan Leeds defender Charlie Taylor came on for his debut and Graeme Shinnie moved up into left midfield.
The visitors soon had a chance after Rory McKeown's wayward header gave Roberts the chance to get in behind, but Nick Ross fluffed his shot following the cutback.
Meekings was not far off with a header from Doran's corner before Kilmarnock broke again to good effect until Sheridan mishit his shot after James Dayton had played him in.
That proved the Irishman's last meaningful contribution as he soon limped off after appearing to pull his hamstring.
Both teams had good chances in the opening stages of the second half.
Cammy Bell saved Warren's header on the line following a corner and Killie broke again before Borja crossed for Heffernan, who misdirected his header from four yards when it looked easier to score, yet he soon made amends.
Inverness were again caught out at the back although Taylor did well to get across and slide in on Gros.
However, the ball ricocheted off the retreating Warren and into the path of Heffernan, who ran into the box and confidently drilled into the far corner.
Caley Thistle immediately tried to hit back and a reverse pass by Ross set up Doran, but Jeroen Tesselaar got across well to divert his shot behind for a corner.
They continued to push men forward but looked more vulnerable on the counter-attack and Esson made a great double save from McKeown and Borja.
Bell made another diving save on his line after Shinnie's corner found the head of Owain Tudur Jones but Heffernan soon put the game beyond them.
Esson had kept out substitute Garry Hay's long-range strike but the veteran regained possession and cut it back from the left byline.
The ball evaded the Killie players in the box but right-back Barbour ran onto it and fired a powerful low effort from the edge of the box that Heffernan flicked into the far corner.
- Sports & Recreation
- Caley Thistle
- Cillian Sheridan
- Andrew Shinnie