Part I: The Psychohistorians
Gaal Dornick travels to the Galactic Empire's capital, Trantor, to take a job with his hero, Hari Seldon. When the two meet, Seldon uses a branch of mathematics called psychohistory to prove that the Galactic Empire will fall in three centuries, ushering in a galaxy-wide Dark Age. But, fear not, Seldon has a plan that he and Gaal will discuss at length tomorrow at the university. When he's arrested and exiled, Seldon reveals his plan: he'll use his exile to build Foundations that will reduce the Dark Age from 30,000 years to 1,000 years.
Part II: The Encyclopedists
Fifty years later, the mayor of the first Foundation, Salvor Hardin, has a couple of problems. His planet is a wasteland; the neighboring planets are after him; and the Board of Trustees are more focused on completing Hari Seldon's Encyclopedia Galactic than actually running the planet. Hardin's plan? A coup d'état. But then a message from Hari Seldon appears, and Hardin realizes that the encyclopedia was a trick—and Hardon has to take over the Foundation and fulfill Seldon's real plan.
Part III: The Mayors
Thirty years after the coup d'état, Hardin remains the mayor of the new City Council. But mo' power mo' problems. A new political group called the Action party has risen to power and is trying to impeach him, plus more neighboring planets have their sights on his lands. Outnumber and outgunned, he must out-think his way through this Seldon Crisis. He does this by convincing his enemies that the Foundation's religious group doesn't support the war—and then hears another prerecorded message from Seldon that warns that the future holds many more challenges.
Part IV: The Traders
Limmar Ponyets is sent to rescue Eskel Gorov from the planet Askone. He then has the bright idea to trade gold instead of technology and whips up a gold transmuting machine (naturally). A councilman named Pherl takes notice of Ponyets's nifty trick and agrees to let Ponyets and Gorov go, and give them some iron, in exchange for the machine. Surprise! Ponyets has recorded the convo and blackmails Pherl into letting them walk away with a lot more.
Part V: The Merchant Princes
Foundation guy Hober Mallow heads to the planet Korell to investigate some missing ships. There, after a little kerfuffle over a religious missionary, he establishes trade with the planet. After a quick detour to planet Siwenna, where he finds out that the Empire (1) lives on, and (2) has nuclear technology, Mallow returns to the Foundation, is tried for and cleared of the death of the religious missionary, then elected mayor. Success!
Two years later, Korell attacks the Foundation. Turns out, Mallow has anticipated this: he's made Korell so dependent on the Foundation that Korell's economy collapses and the Foundation wins the war without even trying.