SPOILERS AHOY.
The Illusionist tries to mesh two genres—a lush romantic melodrama set in a fairytale land of duchesses, princes, and intrigue (a la The Prisoner of Zenda) with the moody mystery of a policeman trying to unravel the secrets of a magician who's been mixed up in murder (like The Prestige). And it nearly works, but not quite. In the end, the mystery's final twist destroys the melodrama.
I badly wanted the movie to work. Who doesn't love that Edwardian fantasy land filled with delectable dukes and pristine princesses, political intrigue and despairing love? It is Ruritania, Austria, or somewhere in Eastern Europe where anyone worth their salt is an Archduke or a Princess von something, and titled dignitaries mix with gipsies, international adventurers, and even illusionists; a not-quite civilised place where men still fight duels for love and honour.
The Illusionist pretends to be this kind of story. But it soon gives away its true nature. When Eisenheim and Sophie fall into bed, there's no pretence left to be kept up. It isn't set in 1900s Ruritania—it's firmly planted in the 2000s, where "whore" is just a mean-spirited, nasty epithet and not an insult to be washed out in blood (if false); where a woman in love has no regard for her reputation or honour, and where the only thing on anyone's mind—and the only indication of morality—is social class.
As the end of the film drew closer, I thought it could redeem itself. The policeman gives up conspiring with a traitor. The murderer kills himself. The Emperor restores justice. The illusionist, having given his beloved justice, retires as mysteriously as he came.
It would have been a perfectly satisfying ending. Just make the policeman's moral quandary a touch more wrenching, and presto—the movie is about whether he will do what he knows to be right. But no—they had to have a shocking twist. And it is revealed that the lady was alive all along, and she and the illusionist framed an innocent (if repulsive) man for her murder and caused his suicide.
This unravels the plot of the melodrama—it cannot survive the revelation that the villain isn't the murderer—the hero is. The moral of the story ends up being that if you are a Crown Prince and beat women, you are evil, but a commoner who frames an innocent man is OK. There's proletariat morality for ya.