Andrea Mandell

USA TODAY

Nick Cannon says he's done with America's Got Talent.

The comedian announced his exit on Facebook page Monday, saying he was "deeply saddened" about being "threatened with termination by executives" after he made a racial joke about NBC on his recent Showtime stand-up special.

"I was to be punished for a joke ... 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. Not to get too detailed but this isn't the first time executives have attempted to 'put me in my place' for so-called unruly actions," wrote Cannon on Facebook. "I will not stand for it. My moral principles will easily walk away from the millions of dollars they hang over my head."

Production on season 12 of America's Got Talent (planned to be Cannon's eighth season as host) is set to begin next month.

Cannon's inflammatory joke, reports The Hollywood Reporter, aired during the comedian's Showtime special, Stand Up, Don't Shoot, which premiered Friday.

"I honestly believe, once I started doing America’s Got Talent, they took my real N— card. They did! Because then like these type of people started showing up to my shows,” said Cannon, pointing out white audience members. “I can’t do the real N— stuff no more, because then they’ll put me on TMZ."

He also cracked that NBC stood for "N— Better Come on" and indicated he felt constrained by the family-friendly summer show.

Talking to Howard Stern on Friday, TMZ reported, Cannon seemed confident NBC would be OK with his routine. "If they fire me from AGT for the things I've said ... I can sue them and create a whole new controversy — 'NBC hates black people!'" he laughed.

But on Monday, Cannon struck a more somber note. "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," wrote Cannon. "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."

Cannon added: "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. "

USA TODAY has reached out to NBC with a request for comment.