After a brief introduction establishing that Mars is "not a dead planet", but rather a dying one inhabited by warring civilizations, the film begins with news of the sudden death in England of John Carter (Taylor Kitsch), a former American Civil War Confederate Army cavalry officer, who has become an eccentric and wealthy scholar-adventurer. The arrival of his nephew Edgar Rice Burroughs (Daryl Sabara) — "Ned" — at his "Uncle Jack's" funeral reveals that, in accordance with his own instructions, Carter's body has been put in a mausoleum which can only be unlocked from the inside. The estate's attorney hands over Carter's personal journal for Ned to read, in the hope that he may discover the reason for Carter's strange behavior and death.
The film flashes back to 1868 and to the Arizona Territory, where Carter is prospecting for gold and having violent encounters with both the Union Army and the local Apache Indians. After fleeing from both, he shelters in a cave with a 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 appears in the cave; Carter kills him and, due somehow to the stranger's large elaborate medallion, is inadvertantly 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), Prince of Zodanga, is now armed with a special weapon obtained from the Therns, and proposes a cease-fire and an end to the war by marrying the Princess of Helium Dejah Thoris (Lynn Collins). The Princess makes an escape and is saved by Carter. Carter, Dejah and Tarkas' daughter Sola (Samantha Morton) embark on a quest to get to the end of a sacred river to find a way for Carter to get back home. There they find information about the ninth ray, a means of utilizing infinite energy and also the key to understand how the medallion works, but they are attacked by the Thern leader Matai Shang (Mark Strong) and his minions, the Green men of Warhoon. After the attack, Carter is captured and is 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 captured by Shang, who tells him the purpose of the god-like Therns and how they manipulate the civilizations on different planets. Carter is able to make an 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 by the viscious Tal Hajus (Thomas Haden Church). Tarkas, Carter and Sola are subjected to a gladiatorial contest with two gigantic 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 Helium and defeats the Zondangian army, killing Sab Than. Carter then marries Dejah and becomes Prince of Helium. That night, Carter decides to stay forever on Mars and throws away his medallion. Seizing this opportunity, Shang banishes him back to the Earth.
Resuming the original framing story, it is revealed that Carter has undertaken a years long quest, looking for clues of the Therns' presence on Earth and hoping to find one of their medallions. 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 made Ned his protector, giving him clues about how to open the mausoleum. Ned runs back to Carter's mausoleum, opens it, but finds no body. Unknown to him, he has been stalked by a Thern. As the would be assassin prepares to strike, Carter suddenly appears and kills the Thern. He tells Ned that he never found any medallion, but instead laid a trap for a Thern. Carter now takes the Thern's medallion, whispers the code words, and is again teleported to Mars, to resume his Barsoomian life.