The narrator, a newspaper correspondent, is traveling across India by second-class train when he meets Peachey Carnehan, a white man planning to extort money from a local prince. Carnehan asks the narrator to deliver a message to his friend, Daniel Dravot. The narrator agrees to do so because he and Carnehan are both Masons.
A few days later, Carnehan and Dravot turn up at the narrator’s office. They are planning an expedition to conquer Kafiristan, and they would like the narrator to provide them with books and maps to plan their journey. The narrator says that Carnehan and Dravot are fools and will likely die before they reach their goal. However, Carnehan and Dravot explain that they have signed a contract: neither of them will have anything to do with women or alcohol until they have become kings of Kafiristan. This contract, they believe, demonstrates that they are in earnest. Reluctantly, the narrator agrees to help them.
Dravot and Carnehan, disguised as a mad priest and his servant, depart for Kafiristan, secretly carrying with them twenty British Martini rifles. The narrator receives news that they have made it across the border but hears nothing more for some time.
Three years later, the narrator is again in his office when he receives a visitor. It’s Peachey Carnehan, but he is so haggard and scarred that at first the narrator doesn’t recognize him. Carnehan, rambling and apparently slightly mad, tells the tale of his adventures with Dravot in Kafiristan.
In Carnehan’s version of events, he and Dravot arrive in Kafiristan and immediately take sides in a local dispute. The locals have only bows and arrows, so Carnehan and Dravot easily take control. Carnehan stresses to the narrator that the people of Kafiristan are white (“fairer than you or me”). Carnehan and Dravot introduce new agricultural practices to the region, set up a new legal system, train the men as soldiers, and extend their power over the surrounding villages. Dravot commands their newly colonized subjects to make golden crowns for the two of them, and they declare themselves kings. It turns out that the people of Kafiristan have some familiarity with Masonic symbols and rituals, and Carnehan and Dravot exploit their superior knowledge of these rites to claim that they are gods, further cementing their control. As far as Dravot is concerned, this is “a master-stroke o’ policy.”
However, Dravot is not content with being king. Based on the idea that the Kafirs are white—and therefore, in his mind, potentially the equal of the English—he believes that he can use them to build a great empire. As he outlines his ambitions to Carnehan, he paces back and forth, chewing his beard, showing the first signs that he is becoming unhinged.
In addition, Dravot demands that the Kafirs provide him with a wife, abandoning the contract he made with Carnehan. Carnehan warns him that this is a bad idea, especially after the people object, stating their belief that any woman who marries a god will die. Dravot insists, and the Kafirs do provide a bride for him. However, she is so terrified that she bites Dravot, drawing blood.
Seeing this, the Kafirs realize that Dravot is not a god after all but only a man, and they immediately rebel. Together with a few loyal soldiers, Dravot and Carnehan flee. At this point Dravot has lost his mind, raving about being an emperor even as Carnehan tries to lead him away from danger. The rebels catch up to them and cut away the rope bridge that Dravot is standing on, causing him to plummet to his death. Carnehan is crucified between two pine trees, but when he survives the night, the Kafirs declare it a miracle and release him.
As he finishes telling his story to the narrator, Carnehan opens the bag he is carrying, revealing the severed head of Dravot, still wearing a golden crown.
Later that day, the narrator comes across Carnehan crawling in the dust by the side of the road, singing to himself, apparently having lost his mind. The narrator takes Carnehan to an asylum. A few days later, he learns from the asylum superintendent that Carnehan has died of heatstroke. The bag carrying the crowned head of Dravot is nowhere to be found.