At the end of the first book, A Princess of Mars, John Carter is unwillingly transported back to Earth. The Gods of Mars begins with his arrival back on Barsoom (Mars) after a ten-year separation from his wife Dejah Thoris, his unborn child, and the Red Martian people of the nation of Helium, whom he has adopted as his own. Unfortunately, Carter materializes in the one place on Barsoom from which nobody is allowed to depart: the Valley Dor, which is the Barsoomian afterlife.

After John Carter's arrival, a boat of Green Martians on the River Iss are ambushed by the previously unknown Plant Men. The lone survivor is his friend Tars Tarkas, the Jeddak of Thark, who has taken the pilgrimage to the Valley Dor to find Carter. Having saved their own lives, Carter and Tars Tarkas discover that the Therns, a white-skinned race of self-proclaimed gods, have for eons deceived the Barsoomians elsewhere by disseminating that the pilgrimage to the Valley Dor is a journey to paradise. Most arrivals are killed by the beasts of Valley, and the survivors enslaved or eaten by Therns.

Carter and Tars Tarkas rescue Thuvia, a slave girl, and attempt to escape, capitalizing on the confusion caused by an attack by the Black Pirates of Barsoom upon the Therns. During the attack, Tars Tarkas and Thuvia hijack a Black Pirate flier, while Carter fights his way aboard another, killing all but one of the Pirates, and rescuing a captive Thern princess. From the captured Pirate Xodar, Carter learns that the Black Pirates, called the "First Born", also think of themselves as gods, and accordingly prey upon the Therns; and additionally identifies the captive Thern as Phaidor, daughter of the "Holy Hekkador" (high priest) of the Therns. When their flier is recaptured by the First Born and taken to their underground realm of Omean, Carter is taken before Issus, the self-proclaimed goddess of Barsoom, who dictates the Therns through secret communications which they mistake for divine revelation.

Issus takes Phaidor as a handmaiden for one Martian year; whereas Carter is imprisoned, with Xodar as his slave as punishment for being defeated by Carter. Thereafter Carter treats him with honor, and thus gains his friendship. In prison, they encounter a young man later identified as Carter's son Carthoris, with whom Carter is taken to a series of games wherein the previous year's handmaidens are killed and later eaten by Issus and her nobles. Carter leads a revolt of the prisoners, killing many of the First Born; and upon the suppression of their revolt, he and Carthoris escape via underground tunnels, and give themselves to guards unacquainted with the revolt to be returned to their prison. Upon hearing of the revolt, Xodar rejects Issus’ divinity and joins the others in escape. Upon later abandoning their aircraft, they encounter Thuvia, who describes the capture of Tars Tarkas by the green warriors of Warhoon (a clan rival to his own). Carter goes to rescue Tars Tarkas, but is discovered by his enemies. After a chase, Thuvia is sent on alone, mounted, while the men attempt a stand against the Warhoons. They are rescued by the Heliumetic navy but do not find Thuvia. Commanding one of the warships is Carter’s friend Kantos Kan but the fleet is commanded by Zat Arras, a Jed (chieftain) of the hostile client state of Zodanga, and Carter is suspected of returning from the Valley of Dor, which is punishable by death. Tardos Mors, the Jeddak of Helium, and Mors Kajak, the Jed of Hastor (the grandfather and father, respectively, of Dejah Thoris, and thus Carter’s in-laws) are absent from Helium, having led fleets in search of Carthoris. Later, Carter discovers that Dejah Thoris may have taken the pilgrimage to the Valley Dor to find him.

Upon returning to Helium, Carter is tried for heresy by the Zodangans; but the people of Helium do not tolerate this, and Carter is held prisoner for 365 days until his son frees him. Thereafter he goes to rescue Dejah Thoris but is kidnapped by the Zodangans. Carter refuses Zat Arras’ offer of freedom in exchange for endorsing Zat Arras as Jeddak of Helium, and is imprisoned. After half a (Barsoomian) year, Carter escapes, and embarks to Omean, with secretly raised troop levies, ships, and soldiers lent by Tars Tarkas. Near Omean Carter is challenged first by the Therns; secondly by Zat Arras; and lastly by the First Born, whereupon Carter causes the Therns and First Born to fight one another, and the Heliumetic crews of the Zodangan fleet mutiny in support of Carter. Thereafter the Heliumites and Tharks defeat the First Born, and Issus herself is killed. But Dejah Thoris, Thuvia, and Phaidor are imprisoned in the Temple of the Sun, each of whose rooms opens only once per year, by Issus, specifically to spite Carter, as Issus was aware that all three were in love with him. Carter and his men scramble to find the keys to their cell in time, but are unsuccessful. Immediately before their room closes, Phaidor attempts to kill Dejah Thoris, and her success or failure are left unknown. The story is thence continued in the third book of Burroughs’ Martian series, The Warlord of Mars.

On March 4, 1912, Burrough's editor at All-Story Magazine, Newell Metcalf wrote suggesting a sequel to Under the Moons of Mars (serialization title of A Princess of Mars). The Valley of Dor, the River Iss and the Sea of Korus were all key locations in the Martian conception of heaven or the afterlife, which Burroughs had introduced in A Princess of Mars. Metcalf, who thought the appeal of these mystical locations might be strong for readers of the previous tale, suggested that John Carter could arrive from Earth at this location and be instrumental in exposing and destroying this religion as a falsehood. These ideas, which may have already have occurred to Burroughs, appeared to be highly inspirational.[2]

During 1912 Burroughs had been working on Tarzan of the Apes, which he finished in June of that year. Incredibly by 20 September 1912 Burroughs had almost completed the sequel to A Princess of Mars, which was entitled The Gods of Mars. It was submitted on October 2, 1912. Metcalf had suggested killing off Dejah Thoris in the story, but Burroughs admitted to be unable to do so. Although readers had already complained about the suspense created at the end of A Princess of Mars, Burroughs once again, produced a story with a cliff hanger ending. The tale was advertised in the December 1912 issue of All-Story magazine.[3]

Burroughs introduced A Princess of Mars, the first Barsoom Novel as though it were a factual account passed on to him personally. He imagines John Carter to be an avuncular figure known to his family for years who entrusted the manuscript of the novel to Burroughs for publication 21 years later.[5] The Gods of Mars is the second Barsoom novel to use this device. John Carter 'visits' Burroughs 12 years after the events of A Princess of Mars, claiming to have mastered the secret of inter-planetary travel and stating this will be the last time he makes such a journey from his adopted home. However, the device was used in two further Barsoom novels, The Chessmen of Mars and Swords of Mars.[6]

While the novel is an example of science fiction, it is most closely related to the planetary romance genre.[7] The genre is similar to sword and sorcery, but includes scientific aspects.[8] Planetary romances mostly take place on the surface of an alien world, frequently include sword fighting, monsters, supernatural elements such as telepathic abilities (as opposed to magic), and civilizations similar to Earth in pre-technological eras, particularly with the inclusion of kingdoms, empires or religious societies. Spacecraft may appear, but are not central to the story (something which makes these tales distinct from Space Opera, where spaceships are usually a key focus of the narrative). There were some Planetary Romances prior to the publication of the Barsoom novels, but A Princess of Mars and The Gods of Mars and other novels in the Barsoom series were the most influential on the numerous similar stories that were published subsequently.[7]

Burroughs's vision of Mars was loosely inspired by astronomical speculation of the time, especially that of Percival Lowell, who saw the planet as a formerly Earthlike world now becoming less hospitable to life due to its advanced age, whose inhabitants had built canals to bring water from the polar caps to irrigate the remaining arable land.[9] Lowell was influenced by Italian astronomer, Giovanni Virginio Schiaparelli, who in 1878, had observed features on Mars he called canali (Italian for "channels"). Mistranslation of this into English as "canals" fuelled belief the planet was inhabited.[10] The theory of an inhabited planet with flowing water was disproved by data provided by Russian and American probes such as the two Viking missions which found a dead, frozen world where water does not exist in a fluid state.[9]

The Valley of Dor, with the ring of cliffs around it and Sea of Korus within it, is placed in a mile-deep crater at Mars' South Pole. However, Burroughs makes a mistake in that he has the sun rise in the east and set in the west as elsewhere in the planet, and the moons are visible from the Valley. In reality, at the South Pole, Mars' moons would not be seen, and the sun would not rise in the east and set in the west (all directions away from the Pole are "north" in any case), but instead ring the cliffs for half the Martian year, and leave the area shrouded in darkness for the other half of the Martian year.

A million years before the narrative commences, Mars was a lush world with oceans. As the oceans receded, and the atmosphere grew thin, the planet has devolved into a landscape of partial barbarism;[11] living on an aging planet, with dwindling resources, the inhabitants of Barsoom have become hardened and warlike, fighting one another to survive.[12] Barsoomians distribute scarce water supplies via a worldwide system of canals, controlled by quarreling city-states. The thinning Martian atmosphere is artificially replenished from an "atmosphere plant".[13]

Race is a major theme in the Barsoom novels. It is a world with clear territorial divisions between White, Yellow, Black, Red and Green skinned races. Each has particular traits and qualities, which seem to define the characters of almost every individual thereof. Nevertheless Burroughs' concept of race, as depicted in the novels, is more like a division between species than between ethnicity.[14]

The first book, A Princess of Mars, introduced the tall, gangly, four-armed, orc-like Green Martians and the more common humanoid Red Martians. John Carter spent his first ten years on Mars without knowing of the existence of the other races, aside from ancient paintings and frescoes that depicted White Martians.

The Gods of Mars introduces two new races; the White-Skinned Therns and the Black-Skinned First Born, both of which are strongly connected to the Martian religion that John Carter exposed in the novel. Both are humanoid like the Reds, and indeed the Therns are close enough to whites on Earth that Carter was able to pose as one, and was easily mistaken for one.

The Therns are white skinned and bald, wearing blond wigs. They live in a well-fortified complex of gardens and temples in the cliffs above the Valley Dor, the supposed Martian heaven; the cliffs also contain a network of subterranean caves and passages. The Therns control the dangerous beasts that live in the valley, and ransack, enslave, or eat the flesh of the survivors. They consider themselves a unique creation, different from other Martians. They are themselves raided by the Black Martians.[15]

Supposedly the inhabitants of a Martian moon, the Black Martians actually live along the coast of both the Sea of Korus and the subterranean Sea of Omean near the south pole. (As such, they are apparently the only Martians who know how to swim.) They call themselves the 'First Born', believing themselves a unique creation among Martian races, and worship Issus, the false deity of the Martian religion. They raid the White Martian Therns carrying off girls as slaves, and have a massive aerial navy, which John Carter defeats.[15] The girls serve as handmaidens for Black Martian women, and they may also be chosen by Issus to serve her for one year, after which they are always put to death. Like the Therns, the Black Martians also enslave some of the Red Martians who come down the Iss, but not the Greens, which they consider unworthy.

There are a number of incidences of religious deception, or the use of superstition by those in power to control and manipulate others, in the Barsoom series. This theme was introduced in A Princess of Mars,[16] but is central to The Gods of Mars. Upon reaching 1,000 years of age almost all Martians undertake a pilgrimage along the River Iss expecting to find a valley of paradise; but find in fact a deathtrap, populated by ferocious creatures and overseen by a race of cruel, cannibal priests known as Therns, who perpetuate the Martian religion through a network of spies across the planet.[1] John Carter's battle to track down the remnants of the Therns and their masters, continues in the sequel The Warlord of Mars.[17] More deceitful priests in a theocratic nation appear in The Master Mind of Mars, where they manipulate a temple idol to control followers.[18]

Burroughs continued this theme in his Tarzan novels. Burroughs was not anti-religious; but was concerned by the abuse and exploitation of religious belief, and saw this as a common feature of organized religion.[19]

John Carter: Earthman Captain John Carter, a “gentleman of Virginia”, is a soldier of fortune after his service as an officer in the Confederate army.[20] After the war he moved to the southwest US to work as a prospector. In 1866 he and his prospector partner strike it rich; but the partner is killed by American Indians and Carter takes refuge in a cave where he is overcome by smoke produced by an American Indian woman and wakes up on Mars. He effectively disappeared for nine years [while on Mars], believed dead, but re-emerged in New York in 1876, settling on the Hudson. He appeared to die in 1886, leaving instructions for a fictionalized Burroughs, who refers to him as an 'uncle' of the family, to entomb him in a crypt, and leaving Burroughs with the manuscript of A Princess of Mars with instructions not to publish it for another 21 years.[21] Carter has no memory before the age of 30 and seems never to age. He is adept with command, horsemanship, swords, and all weapons. He is 6'2" tall, with black hair and gray steel eyes.[20] He is honorable, courageous and eternally optimistic, even in the face of certain death.[22]

Dejah Thoris: A Martian Princess of Helium, who is courageous, tough and always holds her resolve, despite being frequently placed in both mortal danger and the threat of being dishonored by the lustful designs of villains. She is the daughter of Mors Kajak, jed of Lesser Helium and granddaughter of Tardos Mors, jeddak of Helium, highly aristocratic and fiercely proud of her heritage.[23] She was introduced early in the first Barsoom novel, A Princess of Mars, and is the love interest of John Carter.[24]

Carthoris: Son of Dejah Thoris and John Carter, unusual in having no second name (unless it is implied to be Carter); his name is a blend of his parents' surnames, as they had agreed upon. He is described as worthy of his parentage in nobility, ferocity, and intelligence. Because of his father's ancestry, he is considerably paler than other Red Martians. He and his father first meet each other in a Black Martian prison and have adventures together for a while before they figure out their relationship to each other. His jumping and fighting ability is not unlike his father's, suggesting that in the Burroughs novels, the superior strength of Earth men over Martians is interpreted as due to genetics rather than the difference in gravity.

Tars Tarkas: A fierce Green Martian warrior, unusual among his people for his ability to love. He befriends John Carter and later fights at his side. Carter helps him become Jeddak of the Green Martians in A Princess of Mars and negotiates an alliance between the Green Martians and the city state of Helium.[21] Although Tars Tarkas shows some civilization, he remains a noble savage.[25] He is notable for a wry sense of humor invoked when he notices some irony in his present situation, as at his discovery of the Valley Dor.

Kantos Kan: A soldier of Helium and Carter's friend, he is instrumental in organizing the Heliumite expedition to the South Pole, as well as thwarting Zat Arrras' plots.

Xodar: A Black Martian, he was defeated by Carter just before Carter was first captured by the Black Martians, and because of his defeat by Carter, was degraded of all dignity by his own people and made Carter's slave. Thereafter, he serves as one of Carter's lieutenants, providing crucial aid due to his knowledge of the Black Martians' realm.

Zat Arrras [sic]: A Zodangan prince who has been governing Helium in the absence of Dejah Thoris' father and grandfather, he is ambitious and jealous of Carter, hampering his efforts to return to Helium and reunite with Dejah. One of the main villains in the story.

Thuvia of Ptarth: A Princess of Ptarth, rescued by John Carter from the Therns. She is later imprisoned with Carter's wife Dejah Thoris and Phaidor (see below) in a prison which can only be opened once per year.[17] Typically of Burrough's heroines, she is tough, courageous, proud, and strongly identifies with her aristocratic position in Martian society.[17][26]

Phaidor: A high-ranked Thern girl, who becomes enamoured of John Carter and therefore envious of Dejah Thoris. Despite her love and regard for Carter, she is cruel and heartless like the rest of her race, which disturbed Carter. She is described as beautiful, but it is never specified whether or not she is bald like Thern males. Her attack on Dejah Thoris in the last chapter leaves a cliffhanger for the next book.

Many consider the first three books of the Martian series to be a trilogy. The books are a showcase of Burroughs’ talents: imagination, colorful descriptions, and adventure. Burroughs’ complicated and sometimes flamboyant prose, vocabulary, and grammatical constructions are surprisingly sophisticated for pulp fiction.

Before the release of the 2012 film John Carter, producers Jim Morris and Lindsey Collins said that they were working on a sequel based on the second book, with the working title John Carter: The Gods of Mars.[27] However, the film's poor box office performance put plans for sequels on hold.[28]