Grammer, 53, felt chest pains while paddle-boarding with his wife in Hawaii, where they have a second home, and was taken to hospital, where he was found to have suffered a heart attack.
At the time, about seven weeks ago, his spokesman Stan Rosenfield said it was a mild heart attack, but declined to give further details of Grammer's condition or medical treatment.
But Grammer told Entertainment Tonight that the heart attack was not actually mild at all and he nearly died because his heart stopped.
"They had to blast me twice and get me started all over again," he told the news programme. "I did think: 'Oh gosh, I have got to hang on. I've got too much junk I've got to take care of. I've got to take care of the family.'"
Felt like 'Jaws of life' being used on chest
Grammer, who stars with Kevin Costner in the political comedy Swing Vote that opens in the US in August, said it felt "like somebody was actually trying to tear my chest apart with, like, the Jaws of Life."
Grammer's heart attack came three weeks after he learned the Fox network was canceling his sitcom Back to You, in which he played a pompous, womanising TV news anchor opposite Patricia Heaton. The series lasted only one season.
"Obviously you play the hand you're dealt, and it has been a very interesting hand lately; it has been tough," he said.
Grammer gained fame portraying the snooty but lovable psychiatrist Dr Frasier Crane for 20 years on NBC, first as a supporting player on the comedy hit Cheers and then as the lead in the Emmy-winning spinoff series Frasier. He also supplies the voice of the recurring character Sideshow Bob on the Fox cartoon series The Simpsons. – (Reuters Health, July 2008)
Read more:
Pilgrim: why the heart attack?
Young women and heart attacks