The episode begins with the family, except for Marge, watching a parody of Dinosaurs (1991) on television. The staff thought the series was a knock-off of The Simpsons (1989), so at one point Bart exclaims "It's like they saw our lives and put it right on screen," and points at the television screen.
Sideshow Bob's prison number is 24601, Jean Valjean's prison number in Victor Hugo's Les Miserables. It was also the prison number of Hank Jennings in Twin Peaks (1990) and Principal Skinner's number in Vietnam.
This was the second episode Kelsey Grammer guest starred in as the voice of Sideshow Bob. Grammer initially expected Bob to be a one-time role, but it eventually became one of the most popular roles he ever played, as Bob became a recurring character on the show.
The reunion between Krusty and Bob at the telethon is a reference to a surprise reunion between former comedy partners Jerry Lewis and Dean Martin on a 1970s telethon. The telethon logo features an Al Hirschfeld-style caricature of Krusty.
The staff wanted an episode involving a "mystery", so Sam Simon approached Thomas Chastain, head of the organization Mystery Writers of America, to help construct the mystery. A number of clues leading up to the revelation at the end were inserted into the script so that the viewers would be able to solve the mystery on their own. As the episode was being written, the writers had their eyes towards winning an Edgar Award, which is awarded to the best mystery fiction in television and film published or produced in the past year. Despite their efforts, the episode did not win an Edgar Award.