The Illusionist is a 2006 American romantic mystery film written and directed by Neil Burger and starring Edward Norton , Paul Giamatti , and Jessica Biel . It is based loosely on Steven Millhauser 's short story "Eisenheim the Illusionist" . The film tells the story of Eisenheim, a magician in turn-of-the-century Vienna , who reunites with his childhood love, a woman far above his social standing. The film also depicts a fictionalized version of the Mayerling incident .