A new shop named "Needful Things" opens in the town of Castle Rock, Maine, sparking the curiosity of its citizens. The proprietor, Leland Gaunt, is a charming elderly gentleman who always seems to have an item in stock that is perfectly suited to any customer who comes through his door. The prices are surprisingly low, considering the merchandise - such as a rare Sandy Koufax baseball card, a carnival glass lampshade, and a fragment of wood believed to be from Noah's Ark - but he expects each customer to also play a little prank on someone else in Castle Rock. Gaunt knows about the long-standing private grudges, arguments, and feuds between the various townspeople, and the pranks are his means of forcing them to escalate until the whole town is eventually caught up in madness and violence.
Sheriff Alan Pangborn becomes wary of Gaunt as soon as the shop opens. However, his lover, Polly Chalmers, dismisses his suspicions and buys an ancient charm that relieves the arthritis pain in her hands. Tensions rapidly grow after Nettie Cobb, Polly's housekeeper, and her enemy Wilma Jerzyck kill each other in a confrontation sparked by pranks played on them by others. Many other rivalries begin to fester, spurred by the personal motives of the people involved (drugs, secret pedophilia, bad business dealings, religious disagreements, etc.).
Gaunt eventually hires petty criminal John "Ace" Merrill as his assistant, providing him with high-quality cocaine and hinting at buried treasure that could relieve the debt he owes to a pair of drug dealers. Ace's first assignment is to retrieve crates of pistols, ammunition, and blasting caps from a garage in Boston; Gaunt soon begins to sell the pistols to his customers so they can protect their property. He has traveled the world for centuries, selling useless junk that appears to be whatever the customers desire most. They become so paranoid about keeping their items safe that they eagerly buy up the weapons that he inevitably offers and trade away their souls. Ace begins to suspect the supernatural background of his new employer, but Gaunt keeps him in line through intimidation and promises of revenge against Alan and the town.
With the violence in Castle Rock rapidly escalating, Ace and the town's head selectman Danforth "Buster" Keeton (who has embezzled thousands of dollars from public funds) plant dynamite all over town, using the caps Ace brought back. Alan sets out to kill Ace, wrongly believing him to be responsible for a car accident that killed his wife and son, and Polly realizes the evil of the charm she bought and destroys it. As the dynamite bombs explode and Keeton is killed, Ace takes Polly hostage and demands that Alan hand over a hoard of cash he allegedly stole from one of the sites Ace dug up. One of Alan's deputies kills Ace, leaving Alan to face off against Gaunt.
Using sleight of hand and magic novelties that suddenly come to life, Alan forces Gaunt back and grabs his valise, which contains the souls of his customers. Gaunt flees the scene, his car turning into a horse-drawn wagon as he becomes a hunchbacked dwarf, and the survivors are left to ponder an uncertain future.
The novel ends as it begins, with a first-person narrative indicating that a new and mysterious shop is about to open in a small Iowa town - an implication that Gaunt is ready to begin his business cycle all over again.