The novel follows an adolescent runaway from Tennessee with a predilection for violence, known only as "the kid," who is introduced as being born during the famous Leonids meteor shower of 1833. In the late 1840s, he first encounters an enormous and completely hairless character, Judge Holden, at a religious revival in Nacogdoches, Texas. There, Holden shows his dark nature by falsely accusing a preacher of raping both a young girl and a goat, inciting those attending the revival to physically attack the preacher.
The kid carries on journeying alone on his mule through the plains of eastern Texas, and he spends a night in the shelter of a recluse before arriving in "Bexar". After a violent encounter with a bartender which establishes the kid as a formidable fighter, he joins a party of ill-armed United States Army irregulars, led by a Captain White, on a filibustering mission to claim Mexican land for the United States. Shortly after entering Mexico, they are attacked, and many killed, by a band of Comanche warriors. Arrested in Chihuahua, the kid is set free when his cell neighbor and prior acquaintance from Texas, the earless Louis Toadvine, tells the authorities that the two of them would make useful recruits for the state's newly-hired scalp hunting operation, led by John Joel Glanton.
Toadvine and the kid consequently join Glanton's gang. The bulk of the novel details the gang's conversations and depraved, murderous activities as they travel on horseback throughout the borderlands. The gang encounters a traveling carnival, and, in untranslated Spanish, each of their fortunes is told with Tarot cards. The gang originally contracts with various regional leaders to exterminate Apaches and are given a bounty for each scalp they recover. Before long, however, they murder almost anything in their path, including peaceful agrarian Indians, unprotected Mexican villagers, and even Mexican and American soldiers.
Judge Holden, who re-enters the story as a fellow scalp hunter in the Glanton gang, is presented as a profoundly mysterious and awe-inspiring figure; the others seem to regard him as not quite human. Despite his refined manner and remarkable intellect, the judge often proves to be among the most ruthless and bloodthirsty members of the gang, and is strongly implied to prey on children during their travels. According to an ex-priest gang member named Ben Tobin, the Glanton gang first met the judge while fleeing from the onslaught of a much larger group of Apaches. In the middle of the desert, the gang found Holden sitting on an enormous boulder, where he seemed to be waiting for them all. He took them to an extinct volcano, and improvised gunpowder from natural materials, enough to give them the advantage against their Apache pursuers. When the kid remembers seeing Holden in Nacogdoches, Tobin explains that each man in the gang claims to have met the judge at some point before joining Glanton's gang.
After months of marauding, the gang crosses into the Mexican Cession, where they set up a systematic and brutal robbery operation at a ferry on the Colorado River near Yuma, Arizona. Local Yuma (Quechan) Indians are approached to help the gang wrest control of the ferry from its original owner, but Glanton's gang betrays the natives, using their presence and previously coordinated attack on the ferry as an excuse to seize the ferry's munitions and slaughter the Yuma. Because of the new operators' brutal ways, a group of US Army soldiers sets up a second ferry at a ford upriver to cross—which the Yuma briefly appropriate until their ferryman is decapitated and thrown in the river. Eventually, after the gang had amassed a large fortune through robbing settlers using the ferry, the Yumas suddenly attack the gang and kill most of them including Glanton, though Holden (after fighting off the Yumas using his immense strength to level a howitzer by hand) survives and escapes.
The kid, Toadvine, and Tobin are among the few other survivors who escape into the desert, although the kid takes an arrow in the leg. Heading west together, the kid and Tobin encounter a weaponless and hatless Judge Holden and his accompanying imbecile arriving at a watering-hole. The judge negotiates successfully for Toadvine's hat and unsuccessfully for the kid's pistol, and invites them to share in the 'common' water. The kid and Tobin leave the watering hole and move on through the desert. The next evening at another watering site, they have a surprise-attack shoot-out with the judge, who fires a non-fatal shot to Tobin's neck. The kid shoots the two horses the judge came with. As Tobin and the kid hide among bones near the desert creek, the judge delivers a speech about property rights (regarding the shot horses) and advises the kid to reveal himself. Ignoring this, Tobin and the kid continue their travels, both wounded and much weakened. The judge is following the trail and them, a few miles behind. The next day they slightly side-track off the trail and hide, hoping to let the judge pass them by, and lose their trail. The judge does repeatedly pass by them, quite near and initially unaware; and soon addresses them aloud, knowing they are nearby and hiding. Although the kid has had three easy clear-shot opportunities to shoot the judge as Tobin strongly advises, he doesn't take the shots. The judge and the imbecile then leave. Tobin and the kid are in quite bad shape and would likely have died out in the desert, but some benevolent Indians rescue them and they survive.
Both parties end up in San Diego, but the kid gets separated from Tobin when he is caught by local authorities and imprisoned. Holden visits him in jail, stating that he told the jailers "the truth": that the kid alone was responsible for the end of the Glanton gang. The kid declares that the judge was responsible for the gang's evils, but the judge denies it. After reaching through the cell bars to try to touch the kid, Holden leaves the kid alone, stating that he "has errands." The kid is released and seeks a doctor to treat his wound. Under the influence of medicinal ether, he hallucinates that the judge is visiting him, along with a curious man who forges coins. The kid recovers and seeks out Tobin, with no luck. He makes his way to Los Angeles, where he witnesses the executions of Toadvine and David Brown—leaving now only Tobin, whose fate is uncertain, the judge, and the kid.
The kid again wanders across the American West. In 1878, he makes his way to Fort Griffin, Texas and is now referred to by the author as "the man." The lawless city is a center for processing the remains of the American bison, which have been hunted nearly to extinction. At a saloon, where a traveling roadshow performs with a trained dancing bear, the man yet again meets the judge, who does not seem to have aged in the intervening years. Holden calls the man "the last of the true," and the pair talk on equal terms. Holden describes the man as a disappointment, stating that the man held in his heart "clemency for the heathen." Holden declares prophetically that the man has arrived at the saloon for "the dance." A drunk man shoots the dancing bear, and the man tells the judge, "You ain't nothin'," and, noting the dead bear, says that "even a dumb animal can dance."
The man hires a prostitute, then afterward goes to an outhouse under another meteor shower. In the outhouse, he is surprised by the naked judge there waiting for him, who "gather[s] him in his arms against his immense and terrible flesh." This is the last mention of the man. As two men from the saloon approach the outhouse, another man admonishes them not to open the door. They do so anyway, and gaze in awed horror at what they see, stating only, "Good God almighty." The last paragraph finds the judge back in the saloon, dancing in the nude and playing fiddle wildly among the drunkards and prostitutes, claiming that he never sleeps, and will never die.
A brief epilogue features an unspecified person augering a row of holes across the prairie. The worker sparks a fire in each of the holes while an assortment of passionless wanderers crosses the row. The line of holes is described as "a validation of sequence and causality as if each round and perfect hole owed its existence to the one before it there on that prairie."