Gambling, womanizing, hard-drinking writer Ernest Pratt has created a dashing literary hero, Nicodemus Legend, as the main character in his series of dime novels set in the untamed West. Pratt's wildly imaginative stories are written in the first person, giving readers the impression that the exploits are real and that Ernest Pratt is actually Nicodemus Legend, an adventurous man dedicated to justice and science. When Pratt learns that a warrant has mistakenly been issued for the arrest of Legend in Sheridan, Colorado, he travels there to clear the name of his mythical hero. Soon after his arrival, he meets a great admirer of his clever Western tales—eccentric European scientist/inventor, Janos Bartok—who has taken the liberty of borrowing the Legend persona in order to help the local townspeople. Bartok convinces Pratt to assume the identity of his own literary creation, and to use Legend's celebrity as power over enemies who are attempting a land takeover. When Bartok and his apprent
Mordechai, a charlatan evangelist, arrives in Sheridan and bilks credulous farmers of their money and land by predicting the end of the world. So Pratt, impersonating his rakish character Nicodemus Legend, infiltrates the preacher's camp and with Bartok's help, stages an end of the world, bringing the preacher to true religion.
Legend winds up in the middle of a feud between competing paleontologists who think they've made the find of the century in Sheridan—the only problem is the dinosaur bones may be buried directly under Pratt's favorite watering hole, the Silver King. So Legend faces not only the frenzy of the fossil diggers, but the conflict between Creationists and Darwinians.
To promote his newest book, Pratt is asked to serve as a buffalo hunting guide for a group of German publishers who believe he actually is the heroic character, Nicodemus Legend. Repelled by the notion of hunting, he and Bartok, along with some Arapaho Indians, devise a mythical, mechanical buffalo ""monster"" to ward off the hunters—but only attract more to the area.
Pratt is prevailed upon to travel to San Francisco (in the Nicodemus Legend persona) to help a young Caucasian woman, who has spent her entire life among the Arapaho Indians, find her birth parents. In tracking them, he inadvertently stirs up a controversy and must protect the woman and her child from ravenous media and rabid racists.