In 1815 Marseilles, Edmond Dantès is a capable young sailor about to be made captain and to marry his beloved Mercédès. His good fortune breeds enemies. Danglars, who covets the captaincy, and Fernand, who loves Mercédès, draft an anonymous letter denouncing Edmond as a Bonapartist agent, while their drunken neighbor Caderousse lets it happen. At his own betrothal feast Edmond is arrested. The ambitious magistrate Villefort realizes the charge could implicate his own father and, to protect himself, sends the innocent man to be buried in the island prison of the Château d'If.
For years Dantès endures solitary confinement, passing through hope, prayer, rage, and the temptation of suicide. His rescue is not freedom but a friendship: he tunnels into the cell of the Abbé Faria, a learned Italian prisoner who educates him in languages, history, and science, helps him reason out which men betrayed him and why, and reveals the location of an immense hidden treasure. When Faria dies, Dantès takes the dead man's place in the burial sack, is thrown into the sea, cuts himself free, and is reborn into the world.
Recovering the treasure on the deserted island of Monte Cristo, Dantès becomes fabulously wealthy and disappears into a set of assumed identities, chief among them the mysterious Count of Monte Cristo. He first quietly rewards those who were loyal to him, saving the kind shipowner Morrel and his family from ruin. Then he turns to his enemies, who have all risen in the world: Danglars is now a rich banker, Fernand a decorated count, and Villefort a powerful prosecutor. The Count enters Parisian society to draw close to them and their families.
His revenge unfolds slowly and indirectly. Rather than attack the men openly, he exposes the crimes they have hidden and lets those crimes pull them down. Fernand's wartime treachery is revealed in public and he loses his honor and his family; Danglars is lured into financial schemes that bankrupt him; Villefort's secret history of buried guilt and poisoning within his own household is brought to light, destroying his career and his family one death at a time. The Count moves through it all as a calm, almost providential force, convinced he is heaven's appointed agent of punishment.
Yet the machinery of vengeance kills more than the guilty. When Villefort's young son dies as a result of the Count's designs, Dantès is shaken, feeling that he has passed beyond the bounds of vengeance and can no longer claim that God is with him. He spares the broken Danglars at the last and forgives him. Having settled accounts and provided for the next generation's happiness, the Count sails away with the freed slave Haydée, leaving behind a letter whose closing counsel is that, until heaven reveals the future, all human wisdom is summed up in two words: wait and hope.