On a colony planet settled long ago by humans from vanished Earth (called "Urath"), the original crew members of the colonizing starship have used advanced technology to establish themselves as the gods of the Hindu pantheon. Through body transfer, life extension, and weaponized psychic abilities called Attributes, they rule from the Celestial City, a domed paradise at the planet's pole. They suppress technological progress among ordinary humans, enforcing a rigid caste system through the Masters of Karma, who probe citizens' minds during body transfers and condemn those with unapproved beliefs to inferior reincarnations or death.
The novel opens with Yama, the god of Death and the greatest weapon-maker among the gods, now fallen from Heaven's favor, operating a prayer-broadcasting machine at the remote monastery of Ratri, goddess of Night, to recall the consciousness of Mahasamatman, known as Sam, from the Bridge of the Gods. The Bridge is an electromagnetic cloud circling the planet where Sam's mind was projected as punishment decades earlier. Tak, a former archivist condemned to the body of an ape for defying Heaven, assists Yama. Yama succeeds, and Sam awakens disoriented and resistant, mourning his loss of Nirvana, which he experienced as transcendent bliss for over 50 years.
Sam reluctantly re-engages with the world. Secretly, he ventures into the mountains to gamble with a Rakasha demon, a native energy being, wagering his own body to win a guard of fire elementals and rekindle his will to fight. When Mara, the god of Illusion, infiltrates the monastery as a spy, Yama kills him. Sam preaches a sermon to distract the monks while Yama and Ratri combine their powers to reshape the monks' memories, preventing word of the killing from reaching Heaven through the karmic judgment system. The group flees for Khaipur, where Ratri operates a pleasure palace under a mortal identity, and Sam privately vows to bring the gods down.
The narrative pivots into extended flashback. Years earlier, Sam, then the aging Prince Siddhartha, visited the capital city of Mahartha to obtain a new body. He learned that the body merchants had become the Masters of Karma, allied with the Temples: Citizens' brains were probed before transfers, and Accelerationists, who advocated sharing technology with ordinary people, were refused renewal or given diseased bodies. Sam contacted Brahma, the Creator god and chief ruler of Heaven, directly, debated the gods' suppression of technology, and accepted an offer of godhood while secretly planning treachery. He raided the Palace of Karma with his lancers, seized a healthy body, destroyed the facility, and rode into the mountains declaring war on Heaven.
Further back in time, Sam had established himself as Tathagatha the Buddha in the city of Alundil, adopting Buddhism from Earth's historical records as a weapon against the gods' religion. The goddess Kali dispatched Rild, an elite holy executioner, to assassinate him. Sam found Rild sick in the marshes, nursed him to health, and used the resulting debt to disarm the assassination. Rild converted under the name Sugata and achieved genuine enlightenment, something Sam never experienced. When Yama arrived to kill Sam, Sugata intercepted him and challenged him to single combat, knowing he could not win. Yama drowned Sugata, who chose martyrdom as proof of his enlightenment. Sam provoked Yama, lured him into quicksand, and departed to seek weapons.
Sam descended into Hellwell, a vast underground prison where the Rakasha had been bound centuries ago. He offered Taraka, the chief Rakasha, freedom in exchange for military alliance against the gods. Taraka betrayed the pact by possessing Sam's body, ruling a stolen kingdom while Sam remained a prisoner within his own flesh. Over time, Sam's human moral complexity infected the demon. Sam called this "the curse of the Buddha": Taraka absorbed guilt and emotional pain he could never shed. The gods struck back. Lord Agni, the god of fire, destroyed the kingdom, and when Sam and Taraka attempted to escape in a stolen thunder chariot, Yama and Kali captured them. Sam was transported to Heaven.
In the Celestial City, Kali alternated between declarations of love and rejection. Sam plotted to assassinate the divine hierarchy. He persuaded Helba, a thief deity in a female body, to steal the Talisman of the Binder, a belt of circuitry that enhanced his power to control energy, from the Museum of Heaven. Having secretly transferred into the body of the god Murugan, Sam poisoned Brahma and murdered Shiva, the God of Destruction and fellow member of the ruling divine triumvirate.
Kali became the new Brahma, requiring a male body for the role. Mara cast an illusion enabling the phantom cats of Kaniburrha, albino tigers neurologically blinded to the City, to see it for the first time. Sam and Helba were hunted through the streets and killed. Sam's remains were burned, Yama and Kali's wedding proceeded, and Tak was sentenced to incarnation as an ape.
Despite Sam's death, Accelerationism spread, and the city of Keenset became a center of rediscovered technology. Yama, having escaped his apparent death in Heaven through a miniaturized broadcast-transfer device, arrived at Keenset motivated by Kali's betrayal in choosing power over their marriage. Sam assembled a coalition: Keenset's defenders, zombie soldiers supplied by the warlord Nirriti the Black, and the Rakasha. In the Great Battle of Keenset, the combined forces initially shattered the enemy's front lines, but the gods entered the battle and Keenset fell at devastating cost to both sides. Sam and Yama were captured. Yama apparently died by an explosive in his cell, though Kubera, a fellow artificer, suspected another transfer escape. Sam's consciousness was projected into the Bridge of the Gods for the second time.
The final chapter returns to the novel's present after Sam's second return from Nirvana. Sam recovers in Khaipur while Nirriti the Black, revealed to be Renfrew, the original ship's chaplain and a devout Christian, launches a military crusade against the Hindu Temples. Yama, alive in a new body, arrives with weapons, and he and Sam form a new group of Lokapalas, or world-regents, with Kubera and Krishna, an exiled god restored to a new body. Sam tries to ally with Nirriti through Taraka, but Taraka sabotages the message, obsessed with testing himself against Yama. Sam instead negotiates with Heaven: The Lokapalas will defend Khaipur if Brahma sanctions Accelerationism, religious freedom, and an end to the Masters of Karma's control over body transfers. Brahma agrees.
At the Battle of Khaipur, the combined forces defeat Nirriti's army. Brahma breaks Nirriti's neck but is grievously wounded when Lord Indra, a god of the Celestial City fighting alongside Brahma's forces, treacherously attacks from behind; Yama kills Indra. Taraka attacks Yama, but Yama's death-gaze, combined with the dying Brahma's power, destroys Taraka permanently. Nirriti dies in Sam's arms, reciting the Beatitudes; Sam recites Ecclesiastes over him.
Yama carries the wounded Brahma to the Hall of Karma to attempt a body transfer. Heaven reforms: Vishnu the Preserver rules, the Masters of Karma are replaced by nonreligious Wardens of Transfer, and Accelerationism proceeds freely. Sam departs Khaipur after a large red bird from the eastern continent appears to him. Four competing legends explain his departure: that he took up monastic robes, that he crossed permanently to Nirvana, that he walks among humanity as a guardian, or that he was summoned to adventure in the east. Yama departs half a year later, leaving his daughter Murga, whose cognition was affected by a failed body transfer, in the care of Ratri and Kubera. The novel closes with Murga placing flowers daily at Yama's shrine, the only devotion the god of Death receives.