The actor, who died in September, rose to fame playing Omar Little in HBO’s crime drama.
In an extract from his posthumous memoir Scenes From My Life shared with The Guardian, Williams said that he had been worried about how playing a gay role would impact his career.
“As for Omar’s homosexuality, it was groundbreaking 20 years ago, and I admit that at first I was scared to play a gay character,” Williams wrote.
“I remember helping my mother carry groceries to her apartment and telling her about this new role that I booked. I knew from the jump he was going to be a big deal. This character is going to change my career,’ I said. ‘But the thing is…’ I hesitated. ‘He’s openly gay.’”
He continued: “‘Well, baby,’ she said, ‘that’s the life you chose and I support it.’ She hadn’t embraced the arts or my interest in them, but to me, that was her version of encouragement.
“I think my initial fear of Omar’s sexuality came from my upbringing, the community that raised me, and the stubborn stereotypes of gay characters. I made Omar my own. He wasn’t written as a type, and I wouldn’t play him as one.”
Williams died aged 54, with a medical examiner ruling that the actor had died of “acute intoxication” from a combination of cocaine, heroin, fentanyl and p-fluorofentanyl.
Williams’s nephew said in May that his uncle was “doing well” in the days before his accidental overdose, adding that the actor “would not have knowingly taken fentanyl”.