The story takes place 109 years after the complete destruction of human civilization. The Cold War had escalated into a world war, fought mainly between China, Russia, and the United States. As the war progressed, the three warring nations each created a super-computer capable of running the war more efficiently than humans.
The machines are each referred to as "AM," which originally stood for "Allied Mastercomputer", and then was later called "Adaptive Manipulator". Finally, "AM" stands for "Aggressive Menace". One day, one of the three computers becomes self aware, and promptly absorbs the other two, thus taking control of the entire war. It carries out campaigns of mass genocide, killing off all but four men and one woman.
The survivors live together underground in an endless complex, the only habitable place left. The master computer harbors an immeasurable hatred for the group and spends every available moment torturing them. AM has not only managed to keep the humans from taking their own lives, but has made them virtually immortal.
The story's narrative begins when one of the humans, Nimdok, has the idea that there is canned food somewhere in the great complex. The humans are always near starvation under AM's rule, and anytime they are given food, it is always a disgusting meal that they have difficulty eating. Because of their great hunger, the humans are coerced into making the long journey to the place where the food is supposedly kept—-the ice caves. Along the way, the machine provides foul sustenance, sends horrible monsters after them, emits earsplitting sounds, and blinds Benny when he tries to escape.
On more than one occasion, the group is separated by AM's obstacles. At one point, the narrator, Ted, is knocked unconscious and begins dreaming. He envisions the computer, anthropomorphized, standing over a hole in his brain speaking to him directly. Based on this nightmare, Ted comes to a conclusion about AM's nature, specifically why it has so much contempt for humanity; that despite its abilities it lacks the sapience to be creative or the ability to move freely. It wants nothing more than to exact revenge on humanity by torturing these last remnants of the species that created it.
The group reaches the ice caves, where indeed there is a pile of canned goods. The group is overjoyed to find them, but is immediately crestfallen to find that they have no means of opening them. In a final act of desperation, Benny attacks Gorrister and begins to gnaw at the flesh on his face.
Ted, in a moment of clarity, realizes their only escape is through death. He seizes a stalactite made of ice and kills Benny and Gorrister. Ellen realizes what Ted is doing, and kills Nimdok, before being herself killed by Ted. Ted runs out of time before he can kill himself, and is stopped by AM. AM, unable to return Ted's four companions to life, focuses all his rage on Ted. To ensure that Ted can never kill himself, AM transforms him into a large, amorphous, fleshy blob that is incapable of causing itself harm, and constantly alters his perception of time to deepen his anguish. Ted is, however, grateful that he was able to save the others from further torture. Ted's closing thoughts end with the sentence that gives the book its title. "I have no mouth. And I must scream."