Oblivion is set after the events of The Elder Scrolls III: Morrowind, though it is not a direct sequel to it or any other game. The game is set in Cyrodiil—a province of Tamriel, the continent on which all the games in the series have so far taken place.
The story begins with the player imprisoned in a cell for an unknown crime. Emperor Uriel Septim VII, accompanied by Imperial bodyguards known as "the Blades", arrive in the prison, fleeing from assassins who have murdered the emperor's three sons and are now targeting him. The emperor and the Blades reveal that the player's jail cell contains a secret entrance to a part of the city's sewer that functions as an escape route. Pardoned by the emperor, the player follows the group into the sewer, where they come under attack by assassins. All but one of the Blades are cut down in the fighting that ensues. Knowing he is destined to die by the hands of the assassins, Uriel Septim entrusts the player with the Amulet of Kings, worn by the Septim emperors of Tamriel, and orders the player to take it to a man named Jauffre, the grand master of the Blades, at Weynon Priory. Immediately afterward, one of the assassins kills the emperor. The player escapes the sewer and heads out into the open world of Cyrodiil.
The lack of an heir for Uriel Septim has broken an old covenant—the barrier to Oblivion: a dangerous realm that is in another dimension. Multiple gates to Oblivion open, and an invasion of Tamriel begins by magical creatures known as Daedra, killing and destroying anything in their path. Jauffre tells the player that the only way to close the gates permanently is to find someone of the royal bloodline to retake the throne and relight the Dragonfires—with the Amulet of Kings—in the Imperial City. Fortunately, there is an illegitimate son named Martin, who is a priest in the city of Kvatch. Upon arriving at Kvatch, the player finds that the Daedra have destroyed the city and very few survivors remain. A massive Oblivion Gate is obstructing the main city entrance, and the player must venture through the gate into the Deadlands—one of the planes of Oblivion—in order to close it from the inside and allow access to the city. After closing the gate, the player enters Kvatch and takes it back from the Daedra with the assistance of surviving guardsmen. Fortunately, Martin has survived and the player persuades him to come to Weynon Priory.
The player, now recognized as the Hero of Kvatch, returns to Weynon Priory with Martin, finding that it has come under attack by assassins and that the Amulet of Kings has been stolen. The player escorts Jauffre and Martin to Cloud Ruler Temple, the stronghold of the Blades. There, Martin is recognized as the emperor and is given command of the Blades. The player is optionally entered into their ranks and sets off in search of the amulet. After gathering information, the player learns that the group responsible for Uriel Septim's assassination and the theft of the amulet are the Mythic Dawn, a cult dedicated to the worshiping of Mehrunes Dagon, the Daedric Prince of Destruction. The cult believes Dagon is the true creator of the world and wish for him to "cleanse" it of all impurities. Killing the emperor and thus removing the barriers to Oblivion was the first step in realizing this idea. The player attempts to infiltrate the secret meeting place of the cult in the hopes of retrieving the amulet. When the player does so, the cult's leader, Mankar Camoran, escapes through a portal, taking the amulet with him. The player takes the book that had opened the portal to Martin, who deduces a way to reopen the portal. The player seeks out three key artifacts necessary to recreate the portal: a Daedric artifact, the armor of the first Septim emperor, and a Great Welkynd Stone. With all three retrieved, Martin reveals that a final ingredient is needed: a Great Sigil Stone from inside a Great Gate similar to the one that devastated Kvatch. Martin and Jauffre decide to allow the city of Bruma to be attacked by Daedra so that a Great Gate will be opened. Once it is, the player obtains the Stone and closes the Gate, also saving Bruma.
A portal is created at Cloud Ruler Temple and the player is sent through to Mankar Camoran's created realm of Paradise. After bypassing Daedra, Mythic Dawn members and obstacles, the player confronts Camoran and kills him. The player returns the Amulet of Kings to Martin, and they subsequently travel to the Imperial City with the Blades to relight the Dragonfires and end the Daedric invasion. They find the city under attack by Daedra and an enormous avatar of Mehrunes Dagon himself. The player and Martin fight their way to the Temple of the One. There, Martin laments that they are powerless against Dagon's avatar and explains that they can only defeat him one way. He bids farewell to the player and shatters the Amulet of Kings, merging himself with the spirit of Akatosh, the Dragon-God of Time, thus becoming Akatosh's avatar. After a battle, Akatosh casts Dagon back into Oblivion and lets out a mighty roar before turning to stone. Martin, whose soul was consumed by the amulet, enters the afterlife to join his forbears. In a telepathic monologue to the player, he sheds an optimistic light, explaining that while the Amulet of Kings is destroyed and the throne again lies empty, the gates of Oblivion are now shut forever and the future of Tamriel now lies in the players hands. The Empire's high chancellor sincerely thanks the player for their service during the crisis and elects them as the seventh Champion of Cyrodiil.