Michael K Williams is sitting in a hotel in midtown New York wearing a black T-shirt that reads: “I can’t breathe.” Those were the final words of Eric Garner, the black man who died last July after a police officer held him in a chokehold on Staten Island, another part of the city. Last month, when a grand jury decided not to indict anyone in connection with the death, protests sprang up all over the US. Williams’s choice of clothing isn’t fashionable: it’s just something he feels duty-bound to do, a reminder of where he’s come from. “I still stop and pinch myself,” he says in the slow, raspy drawl that’s become his signature. “I just thank God, because things could have been way different for me.”

Williams, who was born in Brooklyn and still lives there, was a successful dancer in the 1990s, working with the likes of George Michael and Madonna before switching to acting, having being encouraged to do so by rapper Tupac Shakur. The youngest of 10 children, he got some bit parts – in The Sopranos and in R Kelly’s rap opera Trapped in the Closet – before landing his big break, the role of Omar Little in The Wire. His portrayal of a gay, shotgun-toting “hood Robin Hood”, who stole from dealers to give to the poor, brought international attention and a cult following in some unlikely places. He was Barack Obama’s favourite character.

Watch a video review of The Gambler Guardian

But Williams struggled to adjust to normal life after shooting The Wire. He got used to being called Omar in the street, began experimenting with cocaine, and was evicted from his Brooklyn housing project after his money from the first series dried up. His life started to resemble something from the show: the lines between reality and what he was portraying on the streets of Baltimore became increasingly blurred. Other cast members experienced similar problems. Williams met Felicia Pearson, who played Snoop, an enforcer for the ruthless dealer Marlo Stanfield. Pearson, who had just served time for second-degree murder and was still in the drugs game, summed it up succintly: “The only way to leave my fucked-up reality is to throw myself into the pretend version of my fucked-up reality.”

Williams’s identity crisis peaked at the end of filming his final scene as Omar, when he looked in the mirror and didn’t know who was looking back. “I was in a different place in life,” he says. “I was using Omar as a means of escape. Now I don’t use my job as a way to define me: it’s what I do, not who I am. I have that understanding now.”

Michael K Williams as the gay ‘Robin Hood’ dealer Omar in The Wire, with Kelli R Brown. Photograph: c.HBO/Everett/Rex

But the roles Williams has taken since haven’t been any less edgy. He says he’d love to get a part in a comedy (“I’d love to be in an Adam Sandler film: Happy Gilmore, Waterboy – classics man!”) and he did show off his comedy chops in The Wire: The Musical, which aired on the Funny Or Die website in 2012. But at the moment, he has carved out a fruitful niche as America’s go-to guy when it comes to complicated badasses, although right now – talking about the quality of the hotel’s complimentary fruit in black fedora and zip-covered designer jeans – he looks like he hasn’t a care in the world. And that’s understandable, because the 48-year-old is on a roll.

His next outing is in The Gambler, a remake of James Caan’s 1974 tale of addiction and self-destruction. Williams plays gangster Neville Baraka, out to collect a gambling debt owed by Jim Bennett, a nihilistic English literature professor played by Mark Wahlberg. Like Omar, Neville isn’t your typical on-screen thug: he might have all the trappings that organised crime brings, but what he really yearns for are pastoral scenes and an unlikely career in agriculture. “He works in a world you might think, from the outside, is the bomb,” Williams says. “Clothes, money, women, respect. But he wants to go live on an avocado farm. What people don’t see is that the people he deals with are manipulative liars, then in comes Jim with this brutal honesty. This is a man who is searching for something and Neville is too.”

Instead of killing the self-loathing, Albert Camus-loving lecturer, he indulges him, keen to go along with the ride and see what happens just for the hell of it. Perhaps unsurprisingly for an actor who has hit rock bottom and bounced back, such a counterintuitive portrayal of criminal life is Williams’s speciality. After The Wire, he got clean and took on the role of Chalky White, the conflicted patriarch of the black community in Boardwalk Empire. Smaller roles in The Road and 12 Years A Slave followed, as well as a part as black panther Tariq Khalil in Inherent Vice. He’s portrayed real-life gangsters, too, including America’s most notorious crack-cocaine dealer, Freeway Ricky Ross, in Kill the Messenger, and later this year he’s due to start filming a biopic of former Wu-Tang Clan rapper Ol’ Dirty Bastard.

His characters aren’t easily pigeonholed: they’re gangsters with hearts of gold; rappers who take limos to claim welfare, followed by MTV camera crews; drug-dealers with a penchant for tennis; loan sharks who want to grow avocados. Being able to bring nuance and humanity to what might otherwise be 2D roles is something Williams relishes. “I use my job to engage empathy and compassion for people society might stereotype or ostricise,” he says. “No one wakes up and says ‘I’m going to become a drug-dealer’ or ‘I’m going to become a stick-up kid’. No. There is a series of events that makes them feel this is the only way out. As a black man growing up in the hood, I bear witness to some of those events.”

Williams was recently recruited by the American Civil Liberties Union as an “ambassador for ending mass incarceration”. It’s an issue Williams takes personally: his next project for HBO, a drama called Crime, is about that very subject. “I could have been Eric Garner,” he says. “I could have been Michael Brown or Trayvon Martin. My goal is to end mass incarceration and to have more dialogue about how can we stop the government filling up jails with low-level, non-violent drug offenders and people with mental illnesses or addictions. Those are health issues, not criminal ones.”

Being considered a role model isn’t something Williams is comfortable with, however. He’d rather be viewed like everyone else, someone who protests or joins in with a hashtag. “I don’t do it because I’m an actor and I need to use my platform,” he says. “No. If I was Joe the plumber or Vincent the handyman, I would still find some way. It’s just about getting out there and being in the march or on social media. It all matters.”

• The Gambler is out in the UK on 23 January.