Behind the Scenes
The idea behind "The Amazing Maleeni" started with executive producer Frank Spotnitz. When pitching ideas for the seventh season episodes, Spotnitz wanted an episode to deal solely on "magic and illusion" and have nothing to do with the paranormal. Spotnitz had been petitioning the writers of The X-Files for a magic-based episode since season two, but nothing ever came to light. Eventually, during the seventh season, Vince Gilligan was assigned to write the episode, something he describes as "agony". Gilligan explained, "The episode started with Frank, because he-for several years-had wanted to write an episode about magicians. Frank was a fan of the TV show The Magician with Bill Bixby so I believe that was part of it, but Frank was interested in the idea of magic and the idea of fooling people who wished to be fooled."
Spotnitz's favorite magician was Ricky Jay, and so, for the episode, Jay was brought in to play the part of The Amazing Maleeni. Initially, however, the episode hit a snag. The production crew discovered that Jay's production agency had not been informed and that he would be unable to guest star in the episode. The staff's back-up magician, David Blaine, was unavailable for shooting as well. Series creator Chris Carter, however, later stated that the show would not take no for an answer: "We got on the phone with him. He agreed to come to our offices to talk about the script and ended up doing some card tricks for us that reduced Frank and I to being six-year-olds again." Jay eventually agreed to do the part, but requested that he only do the tricks he was accustomed to doing. Thus, many of Jay's trademark tricks were included in the episode's script. Gilligan, in retrospect, later noted, "There was no choice other than Ricky Jay as far as we were concerned. He was not looking forward to the idea of playing a magician because I think he felt that magicians were never portrayed very realistically in movies or television shows."
The cast and crew of the episode enjoyed the "amusement park" feel of the story. Gillian Anderson later noted, "Because of all the magic, I was constantly being entertained. The difficulty with something like this is you have tendency to forget that people are still having bad things happen to them." Anderson later stated that, because many of the lines were written in a tongue-in-cheek style, she and David Duchovny said them in a humorous style; the two had to keep reminding themselves that the story revolved around a murder.
The episode used several special effects. However, in order to ensure that the episode felt "camera-real" to preserve the theme of magic and illusions, many of the more intense effects were replaced with more conventional effects. For instance, the scene wherein Bill LaBonge's hand erupted into flames was created through the use of stunt man, rather than through expensive and, ultimately, "less convincing" CGI effects. The scene featuring The Amazing Maleeni turning his head 360 degrees was created using a prosthetic head, courtesy of John Vulich's Optic Nerve Studios.
Trivia
Billy LaBonge is named for the Second Unit Director of Photography, Bob LaBonge.
The Amazing Maleeni was named for real-life magician Max Malini (1875 - 1942). Famous for relying on his own skill rather than props, Malini performed for Kings, Queens, and Millionaires.
Errors
When Mulder and Scully investigate the young magician, Billy LaBonge, he magically shows a big coin. You see it lying on the table, next shot is from a different angle, and the coin is gone. Next shot it's there again. Magic?
Also, in that same scene with Mulder and Scully investigating LaBonge, towards the end of his demonstration (11:35-11:45) you can see his left sleeve go from pulled down to up and then back down.
Mulder calls the dust in Maleeni's van "lycopodium powder" that the Los Angeles Police Department used to collect fingerprints, but the real LAPD uses latent print powder not lycopodium.
Allusions
Scully: Why are you talking like Tony Randall?
Actually, Mulder was talking like Felix Unger, the fussy neat freak played by Tony Randall in the 1970-75 comedy series Odd Couple, opposite slovenly Oscar Madison, played by Jack Klugman. The comedy series, based on the play and movie by Neil Simon, derived most of its humor from the contrast between fussy Felix and Oscar the slouch, two divorced men sharing an apartment. Felix had a very affected and pedantic of speaking.
It was revived for a single, less successful season as The New Odd Couple with Ron Glass as Felix and Demond Wilson as Oscar.
Malini taking a magician's name and then spelling it different is a reference to Houdini. He got his name from the French magician Jean Eugène Robert-Houdin whom he later discredited.
Sources:
http://en.wikipedia.org/wiki/The_Amazing_Maleenihttp://x-files.wikia.com/wiki/The_Amazing_Maleenihttp://www.tv.com/shows/the-xfiles/the-amazing-maleeni-637/http://www.imdb.com/title/tt0751219/The Complete X Files Behind the series, the myths and the movies
All Things: The Official Guide to the X-Files Volume 6