The story is set in the small town of Haven, Maine.
The Tommyknockers takes its title from an obscure children's rhyme. It goes:
"Late last night and the night before,Tommyknockers, Tommyknockers, knocking at the door.
I want to go out, don't know if I can, 'Cause I'm so afraid of the Tommyknocker man."
King himself wrote the second verse; and claims to have heard the first verse when he was a child.
While walking in the woods near the small town of Haven, Maine, Roberta (Bobbi) Anderson, a writer of Wild West-based fiction, stumbles upon a metal object which turns out to be a protrusion of a long-buried alien spacecraft. Once exposed, the spacecraft begins releasing an invisible, odorless gas into the atmosphere which gradually transforms people into beings similar to the aliens who populated the spacecraft. It also provides them with a limited form of genius which makes them very inventive, but does not provide any philosophical or ethical insight, instead provoking psychotic violence (on the part of people like Becka Paulson, who kills her adulterous husband by fatally rewiring the TV, killing herself in the process) and the disappearance of a young boy (David Brown, whose older brother Hilly teleports him to another planet referred to as Altair 4 by the Havenites).
The book's central protagonist is a poet and friend of Bobbi Anderson, named James Eric Gardener, who goes by the nickname "Gard". He is a man with left-leaning, liberal sensibilities who is apparently immune to the ship's effects because of a steel plate in his head, a souvenir of a teenage skiing accident. Unfortunately, Gard is also an alcoholic. His relationship with Bobbi deteriorates as the novel progresses. She is almost totally overcome by the euphoria of "becoming" one with the spacecraft, but Gard increasingly sees her health worsen and her sanity disappear. The novel is filled with metaphors for the stranglehold of substance abuse, which King himself was experiencing at the time, as well as for the dangers of nuclear power and radioactive fallout (as evidenced by the physical transformations of the townspeople, which resemble the effects of radiation exposure), of unchecked technological advancement, and of the corrupting influence of power. Government agencies are uniformly portrayed as corrupt and totalitarian throughout the book, and Bobbi and Gard themselves are led into thinking that they can use the ship's "power" as a weapon to overthrow such authority figures.
Seeing the transformation of the townspeople worsen, the torture and manipulation of Bobbi's dog Peter, and people being killed or worse when they pry too deeply into the strange events, Gardener eventually manipulates Bobbi into allowing him into the ship. After he sees that Bobbi is not entirely his old friend and lover, he gives her one more chance before he finally kills her with the same gun that Monster Dugan had almost killed her with in her back field previously. However, just before she dies, Bobbi sends a telepathic APB and all the townspeople show up at her place very quickly. Meanwhile, Gardener accidentally (by dropping the gun) shoots himself in the ankle. In exchange for using the "new and improved" computers and what little "becoming" he underwent to save David Brown, Ev Hillman helps him escape into the woods (which soon catches fire from one of the Tommyknockers' "toys") at which point Gardener enters the ship, activates it, and with the last of his life telepathically launches it into space, resulting in the eventual deaths of nearly all of the changed townspeople but preventing the possibly disastrous consequences of the ship's influence spreading to the outside world. Very shortly after (in the epilogue) members from the FBI, CIA, and "The Shop" invade Haven and take as many of the Havenites as possible (they kill nearly a quarter of the survivors) and a few of the devices created by the altered people of Haven.
In the last pages, David Brown is discovered in Hilly Brown's hospital room, safe and sound.
The audiobook version of The Tommyknockers is read by Edward Herrmann.