This movie was originally set up at Disney, but M. Night Shyamalan departed from the studio over "creative differences", and brought it to Warner Brothers. Disney has produced Shyamalan's previous four films, and the studio's subsidiary Miramax Films also produced Wide Awake (1998) which Shyamalan wrote and directed. This departure became the subject of the book "The Man Who Heard Voices: Or, How M. Night Shyamalan Risked His Career on a Fairy Tale".
Some of this film was shot in Levittown, Pennsylvania at a Jacobson logistics warehouse site. (Shyamalan has committed to using films sites in PA.) The set, built on the warehouse site, includes an apartment complex and a half city block of row houses. Occasional footage was shot inside the overflow area of the warehouse. Most of the filming was completed after Jacobson work hours.
The plot of the movie is based on a bedtime story M. Night Shyamalan wrote for his kids.
Kevin Costner was considered for the role of Heep. However, Paul Giamatti accepted the part before they contacted Costner (Giamatti was really the first option).
Night demanded the set be within 45 minutes of his Pennsylvania home. He timed the trip which took 43 minutes.
Night was in talks with Philip Seymour Hoffman for an unspecified role. Hoffman, despite the fact that he "loved the script, liked the role" had scheduling conflicts.
The band playing at the party is Silvertide.
Shyamalan's character, "Vick Ran", is a reference to Vikram Seth, an Indian author.
Night, delighted after he discovered unknown Cindy Cheung, was shocked to hear that her agent demanded 1 million dollars for her role in the film. Night was prepared to pay the SAG minimum, $65,000. They settled at $100,000.