Novelist and screenwriter Walter Mosley has quit as a writer on the CBS All Access series “Star Trek Discovery” after disagreeing with the company’s human resources department over his use of the n-word in the writers room, TheWrap has learned.

Mosley, who is African American, said in a New York Times op-ed published Friday that he quit after being contacted by HR because someone complained. Mosley didn’t name CBS Studios or “Star Trek: Discovery” in the op-ed, but an individual with knowledge of the situation said he left the show of his own accord following a discussion with HR, but was not reprimanded.

“We have the greatest admiration for Mr. Mosley’s writing talents and were excited to have him join “Star Trek: Discovery,” CBS Studios said in a statement provided to TheWrap. “While we cannot comment on the specifics of confidential employee matters, we are committed to supporting a workplace where employees feel free to express concerns and where they feel comfortable performing their best work. We wish Mr. Mosley much continued success.”

Also Read: 'Snowfall' Cast, Producers Say 'Nothing Too Drastic' Will Change on FX Drama in the Wake of John Singleton's Death

In the op-ed, Mosley said that while he had used the word, “I hadn’t called anyone it. I just told a story… I was telling a true story as I remembered it.”

“There I was, a black man in America who shares with millions of others the history of racism. And more often than not, treated as subhuman. If addressed at all that history had to be rendered in words my employers regarded as acceptable,” Mosley wrote.

Mosley wrote also that he quit because “I was in a writers’ room trying to be creative while at the same time being surveilled by unknown critics who would snitch on me to a disembodied voice over the phone. My every word would be scrutinized. Sooner or later I’d be fired or worse — silenced.”

“There was a time in America when so-called white people were uncomfortable to have a black person sitting next to them. There was a time when people felt uncomfortable when women demanded the right to vote. There was a time when sexual orientation had only one meaning and everything else was a crime,” Mosley continued.

Also Read: Every Stephen King Movie, Ranked Worst to Best (Photos)

Concluding by saying that “The worst thing you can do to citizens of a democratic nation is to silence them,” Mosley urged readers not to “accept the McCarthyism of secret condemnation.”

Mosley, also a consulting producer and sometime writer on the FX series “Snowfall,” is best known for his crime novels featuring the character Ezekiel “Easy” Rawlins. His 1990 novel “Devil in a Blue Dress” was adapted as a feature film starring Denzel Washington in 1995.