Before the start of the game the Govan Stand was renamed the Sandy Jardine Stand in memory of the former Scotland international who recently lost his battle with cancer.
Former Rangers defender Danny Wilson headed the visitors in front before the home side grabbed an injury-time equaliser through Nicky Law. But more drama was to follow as debutant Osman Sow grabbed a dramatic winner to send the visiting support into delirium.
After the game, McCoist was probed about the prospect of Green returning to the club.
"Whether he comes back or not remains to be seen," he said.
"I thought the timing of it again... it is a big day for the players, a big day for the supporters and even bigger day for Sandy Jardine's family.
"I just didn't think the timing of it was great. For the first time, one or two of the players actually said to me about the timing of all that kind of stuff.
"Everybody does their level best to keep players sheltered and away from it and we will continue to do that because they have to concentrate on results on the park.
"Sometimes it is a little bit of a sideshow we can do without."
Hearts manager Robbie Neilsen was delighted with the way his side responded to Rangers' late equaliser.
"When Rangers scored in the 91st minute then the easiest thing would be for us to fold," he said.
"I've been here before and seen it and it ends up 2-1, 3-1 or 4-1 but we turned it around to show the character to come back and win it.
"I have a group of winners in my team but our season won't be defined by today, even though it's great to come to Ibrox and win.
"It's just another game which we will take confidence from but the Championship is relentless, this result won't matter if we go to Cowdenbeath or Dumbarton and get beaten as it's the same points we are playing for."