The film flashes back to 1868 and to the Arizona Territory, where Carter is prospecting for gold and having violent encounters with both the 7th Cavalry and the local Apache Indians. After fleeing from both, he shelters in a cave with Colonel Powell (Bryan Cranston), one of his pursuers, and discovers a large quantity of gold. A strange figure (later revealed to be a White Martian Thern) suddenly materializes in the cave; Carter kills him and, due to the stranger's medallion, is inadvertently teleported to Barsoom (Mars). There, due to his higher bone density and the planet's lower gravity, Carter is able to jump fantastically high and throw killer punches. He is soon captured, however, by the giant, four-armed Green Martian Tharks under the rule of Jeddak (King) Tars Tarkas (Willem Dafoe).
Elsewhere on Barsoom, the Red Martian cities of Helium and Zodanga have been at war for a thousand years. Sab Than (Dominic West), Jeddak of Zodanga, is now armed with a special weapon (the "Ninth Ray") given to him by the Therns, and proposes a cease-fire and an end to the war by marrying the Princess of Helium Dejah Thoris (Lynn Collins). The defiant Princess escapes and is rescued by Carter. Carter, Dejah and Tarkas's secret daughter Sola (Samantha Morton) embark on a quest descending the sacred River Iss to find a way for Carter to return home. There they find information about the Ninth Ray, the medallion, and the process by which the Therns teleport ("telegraph") from planet to planet, but they are attacked by the Thern leader Matai Shang (Mark Strong) and his minions, the Green Martians of Warhoon. After the attack, Carter is captured and taken back with Dejah, while Sola is able to escape. Dejah grudgingly agrees to marry Sab Than, then gives Carter his medallion and tells him to go back to "Jarsoom" (Earth). Carter decides to stay back and is now captured by the shape-shifting Shang, who tells him about the secret purposes of the god-like Therns and their age-old manipulations of the histories of civilizations on different planets. Carter is able to make yet another escape, and he and Sola go back to the Tharks and ask for their help. There they come to know that Tarkas has been overthrown as Jeddak by the vicious Tal Hajus (Thomas Haden Church). Tarkas, Carter, and Sola are subjected to a gladiatorial contest with two gigantic white Martian apes. After defeating them and killing Hajus, Carter is acclaimed leader of the Tharks. A vast Thark army, with Carter at its head, advances on Zodanga, then on Helium, and defeats the Zodangian army, killing Sab Than. Carter then marries Dejah himself and becomes Jeddak of Helium. That night, Carter decides to stay forever on Mars and throws away his medallion. Seizing this opportunity, Shang re-emerges from hiding and banishes him to Earth.
Resuming the original framing story, it is revealed that Carter has undertaken a ten year long quest, looking for clues of the Therns' presence on Earth and hoping to find another medallion. His sudden "death" and unusual funeral arrangements would seem to indicate that he has succeeded and returned to Barsoom, leaving his "Earth body" in a coma-like state. His presence on Mars was via a sort of virtual body, and the death of his Earth body would end his life on both planets. He has made Ned his protector, giving him clues about how to open the mausoleum. Ned now hastens to the mausoleum, opens it, but finds no body. He has been covertly stalked by a Thern. As the would-be assassin prepares to strike, Carter suddenly reappears and kills him. He discloses to Ned that he never found any medallion, but instead laid a clever trap for a Thern. Carter now takes the Thern's medallion, invokes the necessary code words, and is instantly teleported to Mars, to resume his Barsoomian life with Dejah.