Watch Marvel Studios Legends S1:E8 The Tesseract followed by Loki. Or
read a canonical history as follows:
The Tesseract, also called the Cube, was a crystalline cube-shaped containment vessel for the Space Stone, one of the six Infinity Stones that predate the universe and possess unlimited energy. It was used by various ancient civilizations before coming into Asgardian hands, kept inside Odin's Vault. Eventually, it was brought to Earth and left in Tønsberg, where it was guarded by devout Asgardian worshipers.
Captain America: The First Avenger
In 1942, the Tesseract was retrieved by Johann Schmidt, the leader of HYDRA, who used the Tesseract to power enhanced weaponry in order to defeat the Allies during World War II. Following Schmidt's defeat at the hands of Captain America in 1945, the Tesseract fell into Arctic waters, where it was recovered by Howard Stark. The Tesseract was then kept at Camp Lehigh in New Jersey, where it remained until at least 1970.
Attempting to harness its power, Stark eventually helped found Project P.E.G.A.S.U.S., to whom he relinquished custody of the Tesseract in the 1980s.
Mar-Vell, an undercover Kree scientist, joined P.E.G.A.S.U.S. and harnessed the Tesseract's power to create the Light-Speed Engine to assist the Skrulls in their war against the Kree and took possession of the Tesseract, storing it in her laboratory in orbit. In 1989, Yon-Rogg killed Mar-Vell to obtain the Tesseract, but pilot Carol Danvers destroyed the Light-Speed engine, causing her to be doused in Tesseract energy. Six years later, Danvers, now Captain Marvel, recovered the Tesseract from Mar-Vell's laboratory and renounced custody of it to S.H.I.E.L.D.
The Tesseract remained in S.H.I.E.L.D's possession until 2012, when it was stolen by Loki who used it to open a wormhole and allow the Chitauri to invade New York City. Following the ensuing battle and defeat of Loki and his allies by the Avengers, the Tesseract was surrendered by S.H.I.E.L.D to Thor for safekeeping, who brought it back with him to Asgard.
Thor: The Dark World
After using the Tesseract to repair the Rainbow Bridge, Odin tasked Heimdall, the realm's gatekeeper, with the task of protecting the Tesseract. However, after Loki usurped the throne and disguised himself as Odin, he charged Heimdall with treason, forcing the gatekeeper to flee, while the Tesseract was placed within Odin's vault once more.
Amid the ensuing destruction of Asgard by Surtur, Loki spotted the Tesseract and quietly took it for himself before the vault, along with the planet, were destroyed.
Avengers: Infinity War
Thanos later seized the Tesseract from Loki and crushed it to unveil the Space Stone within and then inserted the stone into his Infinity Gauntlet. He would ultimately use the Infinity Gauntlet to wipe out half of all life in the galaxy.
His plan for the Infinity Gauntlet complete, Thanos destroyed all the Infinity Stones at great risk to himself. This seemed to be the final end of the Tesseract.
In 2023, the Avengers initiated a Time Heist in order to retrieve the Tesseract and the other Infinity Stones. They visited New York in 2012. However, as a result of their interference, Loki was able to get the Tesseract and use it to teleport to the Gobi desert, escaping his rightful custody at the end of the Battle of New York (see below), creating a variance in the timeline.
Undeterred by this failure, Captain America and Iron Man improvised and travelled further back in time to 1970 to retrieve the Tesseract. With the Time Heist complete, they incorporated the Space Stone at the heart of the Tesseract into a new Infinity Gauntlet and reversed Thanos' action, resurrecting billions of lives. This Space Stone was briefly claimed by an alternate Thanos during the Battle of Earth, but Iron Man intervened and used the power of all six stones to wipe out Thanos and his entire army. This deed cost Iron Man his own life.
In the aftermath, the Avengers sought to undo the interference caused by the Time Heist. Captain America time-traveled to 1970 to return the Space Stone, albeit no longer housed in the Tesseract.
An alternate of Loki inadvertently created as a result of the Time Heist escaped custody at New York in 2012 and used the Tesseract to teleport to
the Gobi Desert in Mongolia. However the Time Heist had not gone unnoticed and Loki and the Tesseract were swiftly found and taken by the Time Variance Authority (TVA) to their headquarters. The Tesseract was confiscated by the TVA. Later, Loki retrieved the Tesseract and attempted to use it to escape the TVA, but discovered that it had no power within the confines of the TVA headquarters. This alternate version of the Tesseract presently rests in TVA custody.
'What If...' examines possible alternative 'realities' created by changes at key moments in the history of the Marvel Cinematic Universe.
- What If... Captain Carter Were The First Avenger? In 1942, the Tesseract was retrieved by Johann Schmidt, the leader of HYDRA, who opened a portal to bring a tentacled monster to Earth, the Champion of HYDRA. Captain Carter pushed the creature back through the portal and vanished. The Tesseract was left in the hands of Howard Stark.
- What If... Zombies!? A Zombie plague ravaged the Earth some time before the events of the Infinity War. Thanos was infected and became a Zombified version of himself, but nevertheless arose as the holder of the Infinity Gauntlet with five Infinity Stones, including the Space Stone. Spider-Man, Ant-Man and Black Panther, planning to cure the Zombie plague with the Mind Stone, could unwittingly cause further catastrophe by curing Thanos as well.
- What If... Ultron won? Some time after defeating the Avengers and devastating the whole of Earth, Ultron met Thanos and bested him, seizing the Space Stone along with other Infinity Stones. Ultron used the power of the Infinity Stones to access the Nexus and travel to other universes to continue his campaign to eradicate all life.
- What If... The Watcher Broke His Oath? Ultron, having gained access to the multiverse, was opposed by the Watcher and the Guardians of the Multiverse. A bid by an alternate of Gamora to destroy the Infinity Stones with the Infinity Crusher failed. Eventually an alternate of Doctor Strange trapped Ultron and the Infinity Stones in a pocket dimension and assigned himself to watch over them forever.