Danny Elfman, who had composed the scores for each of Tim Burton’s previous films, including the 1989 “Batman” theme, found writing the music and lyrics for “The Nightmare Before Christmas” easy. “With this film, we talked about each little bit and I was hearing the songs before he was even out the door,” Elfman said (via Cartoon Research).
The songs, including “What’s This?” and “Oogie Boogie’s Song,” were largely composed before there was a script. Elfman helped Burton flesh out the story of the film and its emotional structure with his music. Then, when most of the songs were done, Burton asked Caroline Thompson, who’d written “Edward Scissorhands,” to work on the script.
As Burton admits, this was a strange process, but it turned out to be wildly successful, as “The Nightmare Before Christmas” is now considered a classic and has a huge following to this day.