"I'm going into rehab because I use too much wine and Vicodin," the 67-year-old Carlin said in a statement released Monday by his publicist, Jeff Abraham. "No one told me I needed this. I recognized the problem and took the step myself."
The name and location of the facility weren't disclosed.
The stand-up comedian — and author of the best-selling book "When Will Jesus Bring the Pork Chops?" — said he's never been treated in a rehabilitation facility.
"I know it isn't easy, but I'm highly motivated, and will do whatever's needed," he said in the statement. "My levels of use are nowhere near the worst you hear about these days. I could easily have continued functioning at a good level for a while, but my use would have progressed.
"I would have been in deeper trouble and I didn't want to tolerate that."
His acting credits include With Six You Get Eggroll, Bill & Ted's Bogus Journey and, most recently, Jersey Girl. It was his most substantial acting role to date, in which he played a street-cleaning grandfather who takes in his widowed son (Ben Affleck) and his newborn daughter.
"Originally, my plan as a little boy was to try to be a movie comedy actor like a Bob Hope or a Danny Kaye or a Red Skelton," Carlin said. "That was all based on the idea that I was funny and could be a comedian first. I saw comedian as a stepping-stone and actor as a goal.
"He's got this wonderful gravitas to him. He's been around," the director Kevin Smith said at the South by Southwest film festival in Austin, Texas. "He's a very frank, very honest person but just has this wonderful face that belies a well-lived life."
"He reminds me of my father, too," who died last year, Smith added.
Carlin has one daughter, but no grandchildren.