Michael K. Williams portrayed one of the most iconic characters in TV history when he played Omar Little on HBO's "The Wire," a gay, shotgun-toting stick-up man who robbed from drugdealers to give to the poor.

But in an interview with The New Jersey Star-Ledger, Williams, who's currently starring as Chalky White on "Boardwalk Empire," revealed that he turned in the legendary performance while living a double-life as a cocaine addict getting high on the streets of Newark, New Jersey.

Williams says he became addicted to cocaine and marijuana in 2004, and would sneak away from his friends and family to go on days-long drug binges.

“I was playing with fire," Williams admitted. “It was just a matter of time before I got caught and my business ended up on the cover of a tabloid or I went to jail or, worse, I ended up dead. When I look back on it now, I don’t know how I didn’t end up in a body bag."

During those dark days, he went by his character's street name Omar, or O. “Eventually, I got so sick and tired of this charade. No one who was in my circle, who knew me as Mike, was allowing me to get high. I had to slip away to do drugs. I had to hide it. I’d be gone for days at a time. I was lonely in that part of my life. I was broke, broken and beat up. Exhausted. Empty. I finally said, ‘I can’t do this no more.’ I didn’t want to end up dead.”

Williams now sees the irony of living a secret life in the drug underworld while starring on "The Wire," a show that explored the same topic. “I suffered from a huge identity crisis ... But when I look at the characters, I got to exorcise my demons, a lot. In the end, I was more comfortable with Omar’s skin than my own. That was a problem."

Now clean, Williams credits the spiritual guidance of Reverend Ronald Christian of the Christian Love Church in Irvington, New Jersey with helping him to kick his habit.

Check out Williams' full interview with the New Jersey Star-Ledger here.

Loading Slideshow...
  • Robert Downey Jr.

    After years of struggling with cocaine and heroin addiction and serving jail time, the actor is clean and sober.

  • Amy Winehouse

    Singer Amy Winehouse was found dead in her London home on July 23, 2011. The 27-year-old singer's life was cut short due to accidental alcohol poisoning. <em>CORRECTION: In an earlier version of this slideshow, the date Ms. Winehouse died was incorrect. She died on July 23, 2011.</em>

  • Lindsay Lohan

    The 25-year-old actress has spent the last five years in and out of rehab and still stuggles to stay sober today.

  • Charlie Sheen

    In February 2011 Charlie Sheen claimed he was clean of drugs and alcohol, but high on himself. The actor has publicity struggled with addiction for years, but many doubt his claims of sobriety.

  • Drew Barrymore

    Drew was famously an addict as a child. By her own admission she said she had her first drink at 9, began smoking marijuana at 10 and began using cocaine at 12. By age 13 she entered rehab and has maintained her sobriety since.

  • Robin Williams

    The comedian overcame a cocaine addiction, but headed back to rehab after 20 years of sobriety in 2006 to address his issues with alcohol.

  • Fergie

    The Black Eyed Peas singer kicked a crystal meth and ecstasy habit.

  • Heath Ledger

    An accidental overdose of prescription medication killed the actor on Jan. 22, 2008.

Related on HuffPost: