James L. Brooks said the decision came after the Michael Jackson documentary “Leaving Neverland” aired, the newspaper reported. The HBO documentary details two men’s allegations against Jackson, accusing him of sexually molesting them when they were underage, Rolling Stone reported.

Brooks said the decision was made with show creator Matt Groening and Al Jean, the creative forces behind the long-running cartoon series on Fox.

“It feels clearly the only choice to make,” Brooks told the The Wall Street Journal. “The guys I work with — where we spend our lives arguing over jokes — were of one mind on this.

The episode, “Stark Raving Dad,” aired during “The Simpsons’” third season. Jackson was the voice of a character named Leon Kompowsky, a patient in a psychiatric hospital who believes he is a pop star. The character winds up rooming with Homer Simpson, Rolling Stone reported.

“Leaving Neverland” premiered in January at the Sundance Film Festival, Entertainment Weekly reported. Interviewed during the documentary were Wade Robson, 36, and James Safechuck, 40, who claimed Jackson sexually abused them when they were children, the website reported

Jackson, who died in 2009, had denied any mistreatment of children.

Jackson’s estate sued HBO in Los Angeles Superior Court last month, attempting to block the documentary from airing, according to The Wall Street Journal.

Brooks had considered “Stark Raving Dad” one of his favorites, the newspaper reported.

“This was a treasured episode. There are a lot of great memories we have wrapped up in that one, and this certainly doesn’t allow them to remain.” Brooks said. “I’m against book burning of any kind. But this is our book, and we’re allowed to take out a chapter.”