NOTE: All of the following casting information comes from episode commentaries on The Simpsons DVDs and Blu-rays, except for episodes that have not yet been released on home media. For those episodes, other sources are cited.
The episode: "Krusty Gets Busted"
The role: Sideshow Bob
What happened: The script specifically mentioned James Earl Jones as the voice of Bob, but Kelsey Grammer was hired instead. He has continued to voice Sideshow Bob in his many appearances throughout the series.
2. Prince
The episode: Unproduced sequel to "Stark Raving Dad"
The role: "Prince"/Leon Kompowsky
What happened: Homer's friend Leon Kompowsky was scheduled to return, this time under the delusion that he was Prince. Prince accepted the role, but there was some confusion over the script. The version he had received was apparently not the actual script — and he refused to do anything other than the script he'd been given.
3. Catherine O'Hara
The episode: "Flaming Moe's"
The role: Colette
What happened: Catherine O'Hara actually did record the voice for waitress Colette, but for some reason, producers weren't satisfied with her performance. Jo Ann Harris rerecorded the part.
The episode: "Radio Bart"
The role: Bruce Springsteen
What happened: It's unclear why the writers kept trying to get Bruce Springsteen on the show — he had already turned down playing himself in "One Fish, Two Fish, Blowfish, Blue Fish" and later declined "When You Dish Upon a Star." The role was rewritten as Sting, who voiced himself.
5. Don Rickles
6. George Takei
The episode: "Marge vs. the Monorail"
The role: George Takei
What happened: Takei had already appeared in the episode "One Fish, Two Fish, Blowfish, Blue Fish," but he did not want to appear in an episode that mocked public transporation because he was a member of the board of directors of the Southern California Rapid Transit District. His part was rewritten as fellow Star Trek actor Leonard Nimoy, voicing himself.
7. Tom Cruise
The episode: "Brother From the Same Planet"
The role: Tom
What happened: The role of Bart's cool Big Brother Tom was written for Tom Cruise — hence the name — but he refused. Simpsons regular Phil Hartman did the voice instead.
8.-10. Clint Eastwood, Anthony Hopkins, and Anthony Perkins
The episode: "Last Exit to Springfield"
The role: Dr. Wolfe
What happened: Both Clint Eastwood and Anthony Hopkins turned down the role of the deranged dentist. Anthony Perkins actually agreed to do the part, but he died before he could record it. Hank Azaria ended up doing the voice.
11. O. J. Simpson
The episode: "Last Exit to Springfield"
The role: O. J. Simpson
What happened: Before he was best known for his murder trial, O. J. Simpson was asked to be the panelist on Smartline. When he turned the role down, Dr. Joyce Brothers was brought in.
12.-15. Richard Nixon, Gerald Ford, Jimmy Carter, and Ronald Reagan
The episode: "Krusty Gets Kancelled"
The role: Richard Nixon, Gerald Ford, Jimmy Carter, and Ronald Reagan
What happened: It's not surprising that the four living ex-presidents at the time of the episode did not want to appear on The Simpsons. In fact, Reagan is the only one of the four who responded at all, declining the offer.
16. Wayne Newton
The episode: "$pringfield (Or, How I Learned to Stop Worrying and Love Legalized Gambling)"
The role: Wayne Newton
What happened: Newton turned down the chance to play himself, so Robert Goulet filled in as the big-name performer in Bart's treehouse.
17. Michael Caine
The episode: "Homer and Apu"
The role: Michael Caine
What happened: Caine was originally the actor who took over for Apu at the Kwik-E-Mart, but he wasn't interested. The part was rewritten as James Woods, predating Woods' increasingly odd appearances on Family Guy.
18. Richard Simmons
The episode: "Burns' Heir"
The role: Robotic Richard Simmons
What happened: While Richard Simmons was initially interested, he did not want to play a robot version of himself. In the end, the scene was cut, but it finally appeared in "The Simpsons 138th Episode Spectacular."
19. William Hickey
The episode: "The Day the Violence Died"
The role: Chester J. Lampwick
What happened: William Hickey was offered the role because of his iconic raspy voice. When he turned producers down, they ended up with Kirk Douglas — not a bad second choice.
20. Courtney Love
21. Don King
The episode: "The Homer They Fall"
The role: Lucius Sweet
What happened: Lucius Sweet was supposed to look and sound exactly like Don King — so why not cast King himself? Apparently King wasn't interested in playing a parody version of Don King, so the role went to Paul Winfield, who had previously played King in the biopic Tyson.
22. Bob Dylan
The episode: "El Viaje Misterioso de Nuestro Jomer (The Mysterious Voyage of Homer)"
The role: Space Coyote
What happened: The top two choices for the role were Bob Dylan and Johnny Cash, the latter of whom ended up accepting. Dylan had turned down the show several times before, so producers assumed he wouldn't be interested.
23. Julie Andrews
The episode: "Simpsoncalifragilisticexpiala(Annoyed Grunt)cious"
The role: Shary Bobbins
What happened: Shary Bobbins was an obvious Mary Poppins parody, so it made sense to have Andrews essentially reprise her role from the classic musical. Instead, producers went with regular Maggie Roswell after hearing her read for the role. Presumably she was a less expensive option.
24. Quentin Tarantino
The episode: "Simpsoncalifragilisticexpiala(Annoyed Grunt)cious"
The role: Quentin Tarantino
What happened: When show-within-a-show Itchy & Scratchy did a Reservoir Dogs parody, Tarantino himself showed up. Except the real QT was insulted by the lines written for him and turned down the cameo. Dan Castellaneta ended up doing a Tarantino impression instead.
25.-26. Bruce Willis and Demi Moore
The episode: "When You Dish Upon a Star"
The role: Bruce Willis and Demi Moore
What happened: After Bruce Springsteen declined to appear (again), Bruce Willis and Demi Moore were approached to play themselves as the new celebrities in town. They also turned it down, but Alec Baldwin and Kim Basinger were game to step in.
27. Shirley Temple
The episode: "Last Tap Dance in Springfield"
The role: Vicki Valentine
What happened: Shirley Temple was allegedly offered the role of Vicki Valentine, an embittered former child star clearly modeled after Temple. Unamused, Temple told producers to "F off." Allegedly.
28. Robby Krieger of The Doors
29. Jim Carrey
The episode: "Simpsons Tall Tales"
The role: Singing Hobo
What happened: Jim Carrey was attached to voice the Singing Hobo who narrates the stories in this anthology episode, but he soon realized he was too busy to record his lines. Hank Azaria took over.
30. Jon Bon Jovi
The episode: "Brake My Wife, Please"
The role: Jon Bon Jovi
What happened: Bon Jovi turned down playing himself, so the role was rewritten as Jackson Browne, who was willing to appear.
31. Christina Aguilera
The episode: "A Star Is Torn"
The role: Clarissa Wellington
What happened: The Voice host Christina Aguilera was offered the role of Clarissa, the little girl who goes against Lisa in a singing competition. Christina declined, so the role was reconceived and American Idol winner Fantasia Barrino was cast.
32. Kenneth Branagh
The episode: "In the Name of the Grandfather"
The role: Tom O'Flanagan
What happened: Kenneth Branagh was attached to the episode, most likely in the role of Tom O'Flanagan. It's unknown whether he was dropped or dropped out, but Colm Meaney voiced Tom instead. Kathy Ireland had also been attached to the episode at one point, but she did not appear in the final cut.