Nick Cannon blindsided NBC by declaring he isn’t returning to “America’s Got Talent,” Page Six has learned.

In an extended diatribe on Facebook, the host of the hit show said he decided not to return after an alleged backlash over jokes he made on a recent Showtime special.

He wrote, “I wish ‘AGT’ and NBC the best in its upcoming season but I can not see myself returning.”

TMZ reported the execs believed he had “disparaged the network” in his cable special by joking that NBC had revoked his “black card” by expecting his comedy to be palatable to white audiences.

But network insiders denied to Page Six that NBC threatened to fire Cannon, and added that since he has a contract, he would likely run into legal problems if he tried to follow through with his Facebook threat.

Sources also said that network bigs have been trying to contact Cannon, to no avail.

NBC declined to comment. Cannon didn’t get back to us.