It was the age of levitations and decapitations, of ghostly apparitions and sudden vanishings, as if the tottering Hapsburg Empire were revealing through the medium of its magicians its secret desire for annihilation.” So writes Pulitzer Prize–winning author Steven Millhauser in “Eisenheim the Illusionist,” one of the finest stories in his 1990 collection The Barnum Museum.

Millhausen is a writer of uncommon grace and subtlety. His short stories are like intriguing, dusty daguerreotypes. “Eisenheim the Illusionist” is the tale of a brilliant Jewish magician in early-20th-century Vienna who challenges the domain of the deities and packs theaters with fans who turn into supplicants. The story has been made into the film The Illusionist, adapted and directed by Neil Burger (Interview with the Assassin) and starring the great and often overlooked American actor Edward Norton.

Since the 22-page story is more of a character study than a narrative, Burger was forced to expand the story and even invent some supporting characters. He adds various plot twists to drive the action. Some of the additions and changes work quite well, especially those that provide a sense of how Eisenheim fits into the shadowy world of the empire. The inclusion of a love interest for the magician doesn’t work nearly as well.

We meet Eisenheim as a young man struggling to carve out a living as a cabinetmaker. He falls in love with Sophie von Teschen (Jessica Biel), who is from a wealthy Viennese family. The powers that be will not allow such a mismatch. Eisenheim leaves Vienna, encountering a strange man on the road who introduces him to the spiritual side of magic.

When Eisenheim returns to the city years later, after honing his skills in the Orient and the great capitals of Europe, he is a polished illusionist whose tricks challenge audiences and fellow magicians alike. But in turn-of-the-century Vienna, his questioning of the world order doesn’t sit well with the monarchy, especially not with Crown Prince Leopold (Rufus Sewell).

The crown prince is intent on proving that the popular Eisenheim is a charlatan. To that end, he enlists the assistance of Chief Inspector Uhl (Paul Giamatti). Uhl rather relishes the assignment at first, since he is a closet magician himself. His respect for the crafty and brazen Eisenheim creates the most intriguing relationship in the film. Complicating matters is the onstage revelation that Sophie is engaged to the prince, who hopes the connection with her family offers political advantages.

The middle section of the film, in which Eisenheim decides to challenge the legitimacy of the crown through his magic tricks, shows the movie at its best. Particularly strong is Eisenheim’s take on the Excalibur myth. He uses the prince’s own sword to question his preparedness for the throne.

But instead of allowing the illusion-versus-reality theme to shape the film, Burger switches to the love story and rides it to the end. This long third act includes a tricky payoff that is neither very tricky nor very satisfying, especially in comparison to the rich earlier sections.

The acting is smooth and confident throughout, especially when Norton and Giamatti go toe-to-toe. Also impressive is the lush look of the film, thanks to the striking cinematography and the use of modern-day Prague as old Vienna.

The movie is like a magician who clutters his act by pulling one too many objects out of his hat. Eternal love stories have their place, but not at the expense of Eisenheim the Illusionist.