Heffernan was one of several experienced players on the bench as manager Kenny Shiels kept faith with Mark O'Hara, William Gros and Ross Barbour after bringing in a number of youngsters for the midweek defeat by Celtic.
But the Irishman came on just before the break after Cillian Sheridan pulled up with a hamstring injury and struck twice to earn Killie the win at Rugby Park. Heffernan drilled home in the 58th minute following a break of the ball and flicked home Barbour's strike with five minutes left.
Nicholl said: "We knew it was going to be difficult because of the way they have been this season and what we had on the park, with the inexperience. The manager had a decision to make and it turned out to be the right decision to stick with the young lads, Barbour and Gros and O'Hara.
"They did really well. I thought Willie Gros was excellent up front, O'Hara's composure, and Barbour's willingness, and then the attitude of the senior players who might have been disappointed they didn't start.
"Heffernan got two goals coming on and showing a wee bit of composure, and everything went right for us on the day.
"It just shows you how substitutions go for you accidentally and it has worked out for Heffernan today, but there is no getting away from his composure for the first one and his quick-thinking for the other one."
As well as suffering their third defeat and second cup exit in eight days, Inverness also lost captain Richie Foran and playmaker Andrew Shinnie to injury in the first half hour. And their day got worse when substitute Charlie Taylor got the ball away from Gros with an excellent covering tackle but saw it bounce off Gary Warren and into the path of Heffernan for the opener.
Manager Terry Butcher said: "We never get a chance like that, we have to create our chances. I just couldn't believe how it happened but it did and he has buried it and after that it's us trying to press the game and we got caught again."
Butcher bemoaned his side's luck. "Your captain and most influential player gets taken off in the first half and it was always going to be difficult from there on," he said.
- Sports & Recreation
- Ross Barbour
- Cillian Sheridan