Nick Cannon says he’s leaving as host of NBC’s America’s Got Talent after he learned network execs were considering firing him over a racial joke he told in his Showtime comedy special. Stand Up, Don’t Shoot, described as a stand-up special in which Cannon takes on race and other topics, premiered Friday on Showtime.

America's Got Talent - Season 8

“After days of deliberating over some extremely disappointing news that I was being threatened with termination by Executives because of a comedy special that was only intended to bring communities closer together, I was to be punished for a joke,” he writes on Instagram and Facebook. “This has weighed heavy on my spirit. It was brought to my attention by my “team” that NBC believed that I was in breach of contract because I had disparaged their brand. In my defense, I would ask how so? Or is this just another way to silence and control an outspoken voice who often battles the establishment.”

What Cannon is referring to is a fairly standard clause in employment contracts that does not allow an employee to disparage the company they work for. He goes on to say,” I find myself in a dark place having to make a decision that I wish I didn’t have to, but as a man, an artist, and a voice for my community I will not be silenced, controlled or treated like a piece of property. There is no amount of money worth my dignity or my integrity. I have loved hosting AMERICAS GOT TALENT for the last 8 seasons, watching talented, brave, and courageous Americans accomplish their dreams in front of millions has been nothing but a joy, and everyone has been a pleasure to work with but my soul won’t allow me to be in business with corporations that attempt to frown on freedom of speech, censor artists, and question cultural choices.”

Deadline has reached out to NBC for comment.