The 29-year-old recently went under the knife for an ablation procedure - a minimally invasive operation to correct irregular heart rhythms – back in Manchester.
McTominay has since returned to action and is once again starring for Napoli, with five goals in his 11 games across all competitions this season.
Now with Scotland, the midfielder has revealed he had to be put to sleep to correct his heartbeat ahead of their World Cup opener against Haiti.
"I had to go and get the shock on my heart," he told BBC Sport.
"It was two days before the Haiti game. You've prepared so well. I was in such good condition and then something like that happens. You're thinking, 'how is this happening to me?'
"You have to get on with it, that's the cards that you're dealt in football. Sometimes, things don't go your way.
"I was 100% (fit), but obviously, whenever you're sat in a hospital bed two days before the first game of the World Cup about to get put to sleep, it's not ideal, is it?"
McTominay is expected to be back in action for Scotland in their UEFA Nations League games against North Macedonia and Switzerland this month.
