Matthew Perry claimed a hospital refused to treat him while he was in agonising pain because he is famous.
The actor , 53, said counsellors at a rehab clinic tried to stop him seeking medical help when his colon exploded because they thought he was trying to get drugs.
The Friends star was given just a two per cent chance of survival when an opioid addiction caused his colon to burst and left him in a coma for two weeks.
Matthew explained in his new book he spent around $9million trying to get sober and recently celebrated 18 months of sobriety.
He added that co-star Jennifer Aniston confronted him about his drinking and was a constant source of support.
He said: "[Aniston] was the one that reached out the most. I'm really grateful to her for that."
Extracts from his memoir, Friends, Lovers and the Big Terrible Thing, were published in The Times on Monday,
In the book, he explained how he was in the worst pain of his life and had been unable to empty his bowels for 10 days.
He said: "Something was wrong, very wrong. This was a different kind of pain. Like my body was going to burst. 'Like my insides were trying to force their way out. This was the no f***ing-around kind of pain."
At this point, his assistant Erin came to his aid and realised he needed hospital treatment but she was allegedly told by staff at the sober house: "This is just drug-seeking behaviour. He's going to ask for drugs at the hospital."
Perry claimed sobriety counsellors tried to block their exit and even said they stood in front of their car so he couldn't leave.
The actor was then admitted to hospital where he lapsed into a coma, contracted pneumonia and his colon exploded.
After surviving the night against all odds, Matthew's loved ones were told he needed to be transferred somewhere which has specialist equipment to keep him alive.
But then he claims one hospital declined to admit him because he is famous and said: "They took one look at my chart and apparently said, 'Matthew Perry is not dying in our hospital.' Thanks, guys."
Matthew had 14 surgeries on his stomach and had to use a colostomy bag for nine months.
He said his therapist told him he may have to use a colostomy bag for the rest of his life if he takes drugs again, something that keeps him from relapsing.