The book was in some ways inspired by the life of a schoolfriend of the author who became a doctor. Flaubert's friend and mentor, Louis Bouilhet, had suggested to him that this might be a suitably "down-to earth" subject for a novel and that Flaubert should attempt to write in a "natural way," without digressions. Indeed, the writing style was of supreme importance to Flaubert. While writing the novel, he wrote that it would be "a book about nothing, a book dependent on nothing external, which would be held together by the internal strength of its style," an aim which, for the critic Jean Rousset, made Flaubert "the first in date of the non-figurative novelists," such as James Joyce and Virginia Woolf. Though Flaubert avowed no liking for the style of Balzac, the novel he produced became arguably a prime example and an enhancement of literary realism in the vein of Balzac. The "realism" in the novel was to prove an important element in the trial for obscenity: the lead prosecutor argued that not only was the novel immoral, but that realism in literature was also an offence against art and decency.
The realist movement was, in part, a reaction against romanticism. Emma may be said to be the embodiment of a romantic: in her mental and emotional process, she has no relation to the realities of her world. Although in some ways he may seem to identify with Emma, Flaubert frequently mocks her romantic daydreaming and taste in literature. The accuracy of Flaubert's supposed assertion that "Madame Bovary, c'est moi" ("Madame Bovary is me") has been questioned. In his letters, he distanced himself from the sentiments in the novel. To Edma Roger des Genettes, he wrote, "Tout ce que j'aime n'y est pas" ("all that I love is not there") and to Marie-Sophie Leroyer de Chantepie, "je n'y ai rien mis ni de mes sentiments ni de mon existence" ("I have used nothing of my feelings or of my life"). For Mario Vargas Llosa, "If Emma Bovary had not read all those novels, it is possible that her fate might have been different."
Madame Bovary has been seen as a commentary on bourgeois, the folly of aspirations that can never be realized or a belief in the validity of a self-satisfied, deluded personal culture, associated with Flaubert's period. For Vargas Llosa, "Emma's drama is the gap between illusion and reality, the distance between desire and its fulfillment" and shows "the first signs of alienation that a century later will take hold of men and women in industrial societies." However, the novel is not simply about a woman's dreamy romanticism. Charles is also unable to grasp reality or understand Emma's needs and desires.