A poor but proud young man named d'Artagnan leaves Gascony for Paris carrying three gifts from his father: a little money, an old horse, and a letter to Monsieur de Treville, captain of the king's Musketeers. His father's parting counsel is to fear no quarrel and to endure insult from no one but the king and the cardinal. Within a day d'Artagnan has picked fights with a mysterious nobleman at Meung and, in Paris, with three Musketeers in a row.
Those three become his life. Athos is noble, grave, and privately ruined by a secret; Porthos is loud and vain; Aramis is courtly and forever about to enter the church. When the cardinal's Guards interrupt the scheduled duels, d'Artagnan throws in with the men he came to fight, declaring that his heart is already that of a Musketeer. The four win together, and a friendship hardens into the sworn motto that all stand for each and each for all.
The plot deepens into a court intrigue. Queen Anne has given a set of diamond studs to the Duke of Buckingham of England; Cardinal Richelieu, who hates the queen, schemes to expose her by having the king demand she wear those studs at a public ball. He sends his agent Milady to steal two of the twelve. To save the queen's honor, d'Artagnan and his friends ride for London against the cardinal's traps, and through wounds and arrests d'Artagnan alone reaches Buckingham and brings the studs back in time.
Against this backdrop two private stories darken. D'Artagnan falls into a feud with Milady de Winter and discovers her secret brand, the same brand Athos once found on the shoulder of the wife he believed he had killed. Milady becomes the true antagonist: she manipulates a devout jailer into assassinating Buckingham during the siege of La Rochelle, then murders the woman d'Artagnan loves. The friends realize that no court and no king will stop her.
So they stop her themselves. The four Musketeers, with Milady's English brother-in-law and a masked executioner who turns out to have his own grievance, seize her, try her by their own authority, and put her to death by the river. The book ends in cool moral shadow: Richelieu, shown proof of his agent's crimes, chooses to reward d'Artagnan with a lieutenant's commission rather than punish him, and the four friends, victorious, begin to drift apart.