The Mule takes place approximately one hundred years after The General. The Empire has ceased to exist, Trantor has been sacked by a "barbarian fleet", and only a small rump state of 20 agricultural planets remain. Most of the Galaxy has split into barbaric kingdoms. The Empire entered into an even more rapid phase of decline and civil wars. The Foundation has become the dominant power in the Galaxy, controlling its regions through its trading network.
Leadership of the Foundation has become degenerate. In response to the internal corruption within the Foundation, roughly 30 outer planets belonging to the Foundation who have become wealthy on their own through extensive trade begin to plan a secession war against the Foundation. In addition, an external threat arises in the form of a mysterious man who is known only as the Mule. The Mule (whose real name is never revealed) is a mutant, and possesses the ability to sense and manipulate the emotions of others, usually creating fear and/or total devotion within his victims. He uses this ability to take over the independent systems bordering the Foundation, and has them wage a war against it.
The Foundation is incapable of fighting back and as the Mule advances, leadership in the Foundation assumes that Hari Seldon predicted this attack, and that the scheduled hologram crisis message appearance of Hari Seldon would tell them how to win, just like with Bel Riose. To their surprise, they see the tape run and discover Seldon never predicted the existence of the Mule.
Foundation citizens Toran and Bayta Darell along with psychologist Ebling Mis and refugee clown named "Magnifico Giganticus" travel to different worlds of the Foundation, and finally to the Great Library of Trantor. The Darells and Mis seek to contact the Second Foundation, which they believe will be able to defeat the Mule. They also have suspicion the Mule wishes to know the location of the Second Foundation so that he can use the First Foundation's technology to destroy it.