In Foundation and Empire, a science fiction novel and the fourth book in the Foundation series, the emperor of the Galaxy has deemed the Foundation a threat, and has sent forces to attack it. Though the foundation emerges victorious from their engagement with the Empire, they soon must face another threat: the Mule, a mutant slowly taking over unsuspecting planets. This crisis sparks a search for the Second Foundation, now the only hope for humanity's future.
The first half of the book, titled "The General", tells how the experienced General Bel Riose of the Galactic Empire launches an attack against the Foundation. The Empire still retains far more resources and personnel than the Foundation and Riose is willing to use that advantage to its fullest. Lathan Devers, a native of the Foundation, and Ducem Barr, a fugitive from the planet Siwenna, intercept a message that summarizes the General's doings, and escape to Trantor, to see Emperor Cleon II and show him the message. In their attempts to contact the emperor, Devers and Barr attract the attention of Trantor law enforcement and are forced to flee the planet. In the end, the emperor decides that Riose is a threat to his status and to the balance of the Empire and recalls him to Trantor.
Afterwards, members of the Foundation attempt to analyze the struggle for power between generals and emperors within the old Empire using the principles of psychohistory. Although Hari Seldon did not leave any advanced knowledge of psychohistory with the Foundation, they come to understand that no action was actually required on their part, as with the previous crisis.
The characters of Emperor Cleon II and Bel Riose in this story are based on those of the historical Roman Emperor Justinian I and his general Belisarius. Their story was familiar to Asimov from his recent reading of Robert Graves's novel Count Belisarius , and of his earlier study of Edward Gibbon's History of the Decline and Fall of the Roman Empire , on which the entire series is loosely based.
"The General" was first published in the April 1945 issue of Astounding Science Fiction under the title "Dead Hand".
The second half of the book, titled "The Mule", takes place approximately one hundred years after the first half. The Empire has ceased to exist, Trantor has undergone "The Great Sack", having 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 itself has 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. The existence of the Seldon Plan has become widely known, and Foundationists and many others believe that as it has accurately predicted previous events, the Foundation's formation of a Second Empire is inevitable and unavoidable. The leadership of the Foundation has become dictatorial and complacent, and many outer planets belonging to the Traders plan to revolt.
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.
As the Mule advances the Foundation's leaders assume that Seldon predicted this attack, and that the scheduled hologram crisis message appearance of Seldon will again tell them how to win. To their surprise, they learn that Seldon predicted a civil war with the Traders, not the rise of the Mule. The tape suddenly stops as Terminus loses all power in a Mule attack, and the Foundation falls.
Foundation citizens Toran and Bayta Darell, along with the psychologist Ebling Mis and "Magnifico Giganticus", a clown fleeing the Mule's service, 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 suspicions that the Mule also wishes to know the location of the Second Foundation so that he can use the First Foundation's technology to destroy it.
At the Great Library, Ebling Mis works continuously until his health fatally deteriorates. As Mis lies dying, he tells Toran, Bayta, and Magnifico that he knows where the Second Foundation is. But just before he can reveal the Second Foundation's location, however, Bayta kills him. Bayta had realized, shortly before, that Magnifico was actually the Mule, who had used his powers in every planet they had previously visited. In the same way, he had forced Mis to continue working and find what the Mule was looking for. Bayta had killed Mis to prevent him from revealing the Second Foundation's whereabouts to the Mule.
The Darells are left on Trantor. The Mule leaves to reign over the Foundation and the rest of his new empire. Existence of the Second Foundation, as an organization centered on the science of psychology and mentalics, in contrast to the Foundation's focus on physical sciences, is now known to the Darells and the Mule. Now that the Mule has conquered the Foundation he stands as the most powerful force in the galaxy, and the Second Foundation is the only threat to his eventual rule over the entire galaxy. The Mule promises that he will find the Second Foundation, while Bayta asserts that it has already prepared for him and thus that he will not have enough time before the Second Foundation reacts.
"The Mule" was first published under that title in the November and December 1945 issues of Astounding Science Fiction.