Desperation is the story of a group of people trapped near the eponymous Nevada mining town by a demonic being called Tak who, at the story's inception, inhabits the body of sheriff Collie Entragian. Tak torments his captives, seeking a new host, and displays power over the native wildlife. The story deals with the captives' quest to trap Tak at his place of origin, a mine shaft in the desert's heart.
The novel begins with Peter and Mary Jackson, a couple driving cross-country Peter's sister's car after visiting their friends the Sodersons. Collie Entragian pulls over the Jacksons on the pretext of their missing rear license plate and arrests them for possession of marijuana after finding a baggie in the car trunk. Once they arrive at the Desperation Municipal Building where the holding cells are kept, Entragian shoots Peter in the stomach several times and leaves his body in the doorway before dragging Mary over a dead girl's body and up the stairs to jail.
Once thrown in jail, Mary meets the Carver family, Ralph, Ellen and their son David, who tell Mary that the girl on the stairs was their daughter Kirsten; Entragian pushed her down the stairs once the family arrived at the police station, breaking her neck. The other captive in the cells is Tom Billingsley, the town veterinarian and former councilman. Billingsley witnessed Entragian systematically murder almost every other person in the town of Desperation.
On the outskirts of town Johnny Edward Marinville, an aging author riding cross country on his motorcycle gathering material for a new book (a direct reference to King's own motorcycle trip) with his assistant Steve, comes to the attention of Entragian. Entragian plants the drug baggie found in Peter and Mary's car in one of his bike bags and bundles him into the patrol car. While Entragian is burying his bike, Johnny manages to get a call through to Steve on his cell phone; however, due to the bad transmission, he is unable to tell him to call the state police. Steve senses that his boss is in trouble and his hitchhiker, Cynthia, agrees that they need to locate Johnny and find out what has happened.
Entragian throws Johnny in a cell in the Municipal Building before leaving all the captives. Johnny tells the others that Entragian is bleeding both internally and externally, leading the group to conclude that something is very wrong with him. However, Entragian returns before the conversation can get much further, taking Ellen away in the patrol car and leaving a coyote to stand guard on the captives.
David receives a message from God and realizes that they need to escape from their cells before Entragian returns; after using a bar of soap and killing the coyote guard, he is able to free the others. It is revealed that David Carver has an ability to communicate with and receive guidance from God after a miracle involving his best friend, Brian, and a horrible accident. Upon some advice from Tom, the group arm themselves with weapons from the Municipal Building and decide to hide out in Desperation's abandoned theater. David uses Johnny's cell phone to call Steve and Cynthia, who are now inside of Desperation and were about to grab a can-tah (bewitched stone animal figures), and inform them of their plans; the two agree to leave Steve's truck and meet up with the others at the theater. Entragian returns to the Municipal Building in Ellen's body to discover that the captives have escaped, and promptly sends out creatures to determine where they are hiding.
Once holed up in the theater, the group begins to discuss their options; Steve and Cynthia had stumbled across another survivor, Audrey Wyler, who begins to tell the group about how the Desperation Mining Corporation had recently accidentally uncovered the China Pit (an old mining shaft). The survivors' first inclination is to escape Desperation, until David reveals that it is God's will that they confront Entragian and seal him in the China Pit again; the group begins to argue amongst themselves about whether they should stay or go. Tom leaves the group, and is soon attacked by a desert beast being commanded by Entragian; the rest of the group, except for Audrey and David, rush to his rescue and kill the beast, but Tom bleeds out from his wounds. While the others were distracted, David hid in a rear room of the theater to pray to God and ask for help. Audrey comes across David while he is in a prayer trance and attempts to strangle him. Steve and Cynthia burst into the room and separate Audrey from David, revealing that Audrey is being controlled by Entragian through the use of can-tahs . While the group is busy checking on David and watching Audrey's body disintegrate, a possessed Ellen grabs Mary and takes her to the mining pit.
No longer feeling safe in the theater, the survivors move to Steve's truck to try to determine what they should do. David explains the visions that he had while in his prayer trance, and the group comes to understand that Entragian is possessed by an ancient evil, a supernatural entity that calls itself Tak, which had been imprisoned in the China Pit mineshaft until the Desperation Mining Corporation unearthed it. Tak has the ability to control the local desert wildlife, such as buzzards, snakes, spiders, scorpions, and coyotes, and can also take more direct control of human hosts, though such manifestation causes rapid deterioration of the host's body. As such, Tak needs to frequently find new hosts to inhabit in order to travel outside the ini , a well located in an underground chamber that serves as Tak's entryway into this world. After discussion, David, Johnny, Ralph, Cynthia and Steve decide to go to the mining pit to both rescue Mary and seal Tak inside the mining shaft.
Meanwhile, Mary has escaped from the shed where she was being held and begins to run out of the mining pit, the possessed Ellen giving chase. Ellen's body disintegrates before Tak can catch Mary, and is forced to possess a nearby golden eagle. The group arrive in time to help Mary inside, and gather some ANFO explosive to blow up the China Pit. Tak lies in wait at the China Pit entrance for the group to enter, managing to kill Ralph Carver who was trying to protect his son before the group manages to kill the golden eagle he is possessing. Johnny prevents the rest of the group from going forward, and proceeds to blow up the ini with the ANFO, sacrificing himself in order to seal Tak in the China Pit.
David, Mary, Steve and Cynthia evacuate the pit as the explosion goes off, and begin to leave the town of Desperation. Before leaving, they stop to collect Mary's car; while in it, David finds in his pocket the hall pass from his previous "deal with God" with a message from Johnny written on it.