The Marquis Grégoire Ponceludon de Malavoy (Charles Berling) is a minor aristocrat and engineer living in the Dombes, a boggy region north of Lyon. He is one of the few aristocrats who care about the plight of the peasants. Horrified by the sickness and death caused by the disease-carrying mosquitoes that infest the swamps, he draws up plans to drain them; however, the project is far too costly for him to pay for himself, so he goes to Versailles in the hope of obtaining the backing of King Louis XVI (Urbain Cancelier).
Just before reaching Versailles, Ponceludon is robbed and beaten. He is found by the Marquis de Bellegarde (Jean Rochefort), a minor noble and physician whose wit lacks timeliness. As Ponceludon recuperates at the marquis' house, Bellegarde sympathizes with Ponceludon's mission and takes him under his wing, teaching him about wit (l'esprit), the primary way to be recognized at Versailles, where the aristocracy have taken to comparing themselves to Voltaire--all the while missing the point of their hero's ridicule. At first, Ponceludon's provincial background exposes him to attacks at parties and gatherings, even though he proves himself a worthy adversary in verbal sparring.
At one such party, he catches L'abbé de Vilecourt (Bernard Giraudeau) cheating at a game of wits, with the help of his lover, Madame de Blayac (Fanny Ardant), a beautiful and rich recent widow of the man who was to have been Poceludon's sponsor at court. Although Madame de Blayac fears being exposed, Poceludon assures her that such is not his intention. Blayac repays his generosity by arranging for the certification of his lineage--thereby allowing his suit to proceed. Despite his success, Ponceludon begins to see how hollow and rotten is the tree that is the court at Versailles--a motif that runs throughout the film (his barren swamp-infested land; the dark roads that lead to court; the moral corruption of Versaille, etc.)
The only exception is Mademoiselle Mathilde Bellegarde ("beautiful guard, or beautiful to keep") (Judith Godrèche), the doctor's daughter. She initially agrees to marry Monsieur de Montaliéri, a rich, old aristocrat whose wife is dying. Her motivation is twofold: to support her science experiments and to help pay off her father's debts. She is, as her father inaccurately describes her, a child of Rousseau and his book Emile: Or, On Education, which emphasized a boy's free choice in his interests and the submission of women to their husbands, which Sophie is in direct opposition to. Ponceludon and Mathilde quickly fall in love. As a result, she begins to dread her upcoming marriage.
Sensing the threat to her protegé from this unexpected quarter, Madame de Blayac traps Ponceludon during a dinner party (her accomplice is Motaliéri) where one too many guest has been invited. A contest of wit is used to settle who must make a humiliating departure. Sexually distracted by Blayac, Ponceludon is the loser and is convinced that his disgrace will force him to leave the court. However, he is reminded of why he set out in the first place when a village child dies from drinking contaminated water. During this time, Mathilde appears at court, breaking the terms of her engagement contract.
Freed from the threat of his rival, Vilecourt finally has his moment in the sun: an audience before the king. The abbé is an enthusiastic showman who initially impresses the king with his presentation of proof that God is the prime mover. The abbé, however, falls from grace, and Blayac turns her attention to Ponceludon--convincing him to return to Versailles. He sleeps with her in exchange for her assistance at court; in the end, she arranges a meeting with the king. She maliciously has Mathilde's father attend her in his capacity as a doctor while Ponceludon is still in her bedroom, ensuring that Mathilde learns of their relationship.
There is a presentation at court of Charles-Michel de l'Épée's work with deaf people and development of sign language. The nobles ridicule the deaf mercilessly. In response, de Bellegarde stands and asks how to sign "bravo," leading Ponceludon to rise and clap to show his support. This act of kindness touches Mathilde and they soon make up.
Ponceludon joins the king's entourage and, after showing off his engineering prowess by proposing an improvement to a cannon, secures a private meeting with the king to discuss his project. The embarrassed cannoneer then insults Ponceludon, forcing him into demanding a duel. Madame de Blayac almost persuades him to avoid the duel, but he eventually decides to proceed, under the supervision of de Bellegarde. He kills the cannoneer, but is later informed that Louis XVI cannot meet with someone who has killed one of his officers right after his death, although he is assured that it was right to uphold his honor.
Madame de Blayac is furious when she learns that Ponceludon has left her for Mathilde and plots her revenge. Ponceludon is invited to a costume ball "only for wits". Upon arriving at the ball with Mathilde, he is maneuvered into dancing with Madame de Blayac and is tripped. His spectacular fall earns him the derisive nickname the "Marquis des Antipodes". Ponceludon renounces the decadent court life and leaves with Mathilde.
The movie closes in Dover, England, in 1794, after the French Revolution. Bellegarde has fled there for his safety. Text appears on screen informing the viewer that Citizens Grégoire and Mathilde Ponceludon successfully drained the Dombes and live well in revolutionary France.