Michael Jackson called Matt Groening and requested to voice a character on the show. He was a big fan of Bart and promised to write a number one song for him. The song he wrote, "Do the Bartman", reached number one in many European countries in 1991.
Michael Jackson performed the speaking voice of Leon Kompowsky under the pseudonym John Jay Smith. Although he was able to lend his voice to the speaking parts of a character, the record company would not allow him to sing. As an alternative Jackson entrusted Kipp Lennon, a founding member of the folk band Venice, with the job of the singing parts of the character. Lennon has contributed to several episodes of the series.
In the original script when Leon speaks to Bart over the phone and identifies himself as Michael Jackson, Bart sarcastically asks if Prince is with him. The reference was changed to Elvis Presley at the request of Jackson.
In the original script, Homer takes Barney to rehab and ends up being committed instead. James L. Brooks came up with the idea of Homer being committed for wearing a pink shirt.