At the opening of the book, the narrator, an everyman named John (but calling himself Jonah), describes a time when he was planning to write a book about what important Americans did on the day Hiroshima was bombed. While researching this topic, John becomes involved with the children of Felix Hoenikker, a Nobel laureate physicist who helped develop the atomic bomb. John travels to Ilium, New York, to interview the Hoenikker children and others for his book.
In Ilium John meets, among others, Dr. Asa Breed, who was the supervisor "on paper" of Felix Hoenikker. As the novel progresses, John learns of a substance called ice-nine, created by the late Hoenikker and now secretly in the possession of his children. Ice-nine is an alternative structure of water that is solid at room temperature. When a crystal of ice-nine contacts liquid water, it becomes a seed crystal that makes the molecules of liquid water arrange themselves into the solid form, ice-nine. Felix Hoenikker's reason to create this substance was to aid in the military's plight of wading through mud and swamp areas while fighting. That is, if ice-nine could reduce the wetness of the areas to a solid form, soldiers could easily maneuver across without becoming entrapped or slowed.
John and the Hoenikker children eventually end up on the fictional Caribbean island of San Lorenzo, one of the poorest countries on Earth, where the people speak a barely comprehensible creole of English (for example "twinkle, twinkle, little star" is rendered "Tsvent-kiul, tsvent-kiul, lett-pool store"). It is ruled by a dictator, "Papa" Monzano, who threatens all opposition with impalement on a giant hook.
San Lorenzo has an unusual culture and history, which John learns about while studying a guidebook lent to him by the newly appointed US ambassador to the country. He learns about an influential religious movement in San Lorenzo, called Bokononism, a strange, postmodern faith that combines irreverent, nihilistic, and cynical observations about life and God's will with odd, but peaceful rituals (for instance, the supreme act of worship is an intimate act consisting of prolonged physical contact between the bare soles of the feet of two persons, supposed to result in peace and joy between the two communicants). Though everyone on the island seems to know much about Bokononism and its founder, Bokonon, the present government calls itself Christian and practicing Bokononism is punishable by death on "the hook."
As the story progresses, it becomes clear that San Lorenzo society is more bizarre and cryptic than originally revealed. In observing the interconnected lives of some of the island's most influential residents, John learns that Bokonon himself was at one point a de facto ruler of the island, along with a US Marine deserter. The two men created Bokononism as part of a utopian project to control the population. The ban was an attempt to give the religion a sense of forbidden glamour, and helps draw people's attention away from the economic problems of the country. It is found that almost all of the residents of San Lorenzo, including the dictator, practice the faith, and executions are rare.
When John and the other travelers arrive on the island, they are greeted by "Papa" Monzano, his adopted daughter Mona, and around five thousand San Lorenzans. It becomes clear that "Papa" Monzano is extremely ill, and he intends to name Franklin Hoenikker his successor. Franklin, who finds it hard to talk with people, is uncomfortable with this arrangement, abruptly hands the presidency to John, who grudgingly accepts. Franklin also suggests that John should marry Mona.
The dictator later uses ice-nine to commit suicide rather than succumb to his inoperable cancer. Consistent with the properties of ice-nine, the dictator's corpse instantly turns into solid ice at room temperature. This is followed by the freezing of Dr Schlichter von Koenigswald, "Papa" Monzano's doctor and a former S.S. Auschwitz physician, who accidentally ingests the ice-nine upon Monzano's examination.
John and the Hoenikkers plan to gather the bodies of both Monzano and his physician in order to ritualistically burn them on a funeral pyre, thereby eliminating the traces of ice-nine. They also begin systematically cleansing the room with various heating methods, taking the utmost care not to leave any trace of ice-nine behind.
It is here where John inquires as to how the ice-nine came into "Papa" Monzano's possession. The Hoenikkers explain that when they were young, their father would riddle them with the concept of ice-nine. One day, they find their father has died taking a break from freezing and unfreezing ice-nine to test its properties. With the sweep of a cloth, Frank Hoenikker collects residual amounts of ice-nine from a cooking pan, as was the various collection and examination methods of their father when creating the substance. A dog licks the cloth and also instantly freezes. Witnessing this, the young Hoenikkers finally deduce the properties of ice-nine. They collectively cannot determine who had what part in gathering the ice-nine, but chunks of the substance were chipped from the cooking pan supply and placed in mason jars then later in thermoses.
John and the Hoenikkers pause the ice-nine decontamination to attend John's inauguration festivities. During the festivities, San Lorenzo's small air force presents a brief air show, but one of the airplanes malfunctions and crashes into the dictator's seaside palace, causing his still-frozen body to tumble into the ocean; all the water in the world's seas, rivers, and groundwater turns into ice-nine, sure to kill almost all life in a few days.
The freezing of the world's oceans immediately causes violent storms and tornadoes to ravage the landscape, and John manages to escape with Mona to a secret bunker. Upon hearing the storms subside after several days, they emerge. Exploring the island and looking for survivors, they discover a mass grave where all the surviving San Lorenzans had killed themselves with ice-nine, on the facetious advice of Bokonon. Displaying a mix of grief and resigned amusement, Mona kills herself as well. A shocked John is later found by survivors (an American couple he had met on the plane to San Lorenzo and Felix Hoenikker's two sons), and he lives in a cave for several months, during which time he writes a memoir revealed to be the novel itself.
The book ends by his meeting a weary Bokonon, who is contemplating what the last words of The Books of Bokonon should be. Bokonon states that if he were younger, he would have climbed to the top of Mt. McCabe, placed a book about human stupidity at the peak, and, through the administration of ice-nine, "make a statue of myself, lying on my back, grinning horribly, and thumbing my nose at You Know Who"; it is strongly implied that John is inspired to do just that, with the novel as the "book about human stupidity."