In the year 3956 BBY, as the Jedi Civil War neared its conclusion, a significant confrontation unfolded between Bastila Shan, the former Jedi Knight who had become the apprentice of the Sith Lord Darth Malak, and Revan, the one-time Sith Lord who had since been redeemed and returned to the ways of the Jedi Knight, alongside his Jedi companions Jolee Bindo and Juhani. On the rooftop of the Rakatan Temple located on Rakata Prime, Shan intercepted Revan and his allies. Their mission was to disable the disruptor field emanating from the temple, a crucial step to enable the Galactic Republic's forces to successfully attack the Star Forge space station, which served as the primary source of power for the Sith Empire's ongoing conflict. Despite a hard fought battle, Revan, Bindo, and Juhani almost overcame Shan. Nevertheless, Shan then made an attempt to sway Revan back to his previous identity as a Sith Lord. Revan firmly declined her proposition, reaffirming his commitment to the Jedi Order. Consequently, Shan retreated to the Star Forge aboard a starship.

During the Jedi Civil War in 3956 BBY, which pitted the Galactic Republic against the Sith Empire, the Jedi Knight Bastila Shan faced defeat on the Leviathan, the flagship of the Dark Lord of the Sith Darth Malak, leading to her capture as a prisoner. Malak transported her to the planet of Rakata Prime, where she consistently resisted his efforts to convert her. However, after enduring a week of relentless torture, Malak eventually broke her resolve, compelling her to embrace her hatred and succumb to the dark side. He manipulated her into believing that the Jedi Council was exploiting her, prompting her to seek vengeance by assuming the role of his apprentice, thus replacing the slain Darth Bandon. Revan had managed to locate all five Star Maps necessary to pinpoint the Star Forge's location. As the Ebon Hawk approached the space station, a disruptor field severely damaged its hyperdrive, resulting in a near-fatal crash landing on the planet. Juhani suggested that the group scavenge for parts from other downed ships to repair the Ebon Hawk's hyperdrive, but the disruptor field still needed to be deactivated. The utility droid T3-M4 discovered the generator's location, detecting energy signatures on the ship's sensors originating from the nearby Temple of the Ancients.
Revan faced an assault from Rakatan warriors belonging to the Rakatan tribe. Impressed by Revan's strength, he and his crew were granted an audience with the One. The One recounted Revan's original promise to eliminate The Elders and acquire their secrets to enter the Temple of the Ancients. Revan sought out the Elder tribe, where the Elder Council exposed the One and his tribe's brutal and warlike nature. Consequently, Revan and his crew decided to assist the Elders instead. The Elder Council was hesitant to trust Revan again due to his previous betrayal. They tasked Revan with rescuing an Elder scout from the One's enclave to regain their trust. Upon reaching the One's enclave, the One and his tribe attacked Revan and his crew. Revan's prowess overwhelmed the entire tribe, and he freed the scout. With the Elders' support secured, they granted Revan access to the Temple, but tradition dictated that he enter alone. While Revan waited with the Rakatan priest for the shield to lower, Juhani and Bindo both experienced a premonition warning them of imminent danger inside. They insisted on accompanying Revan, struggling to convince the Rakata priest to disregard tradition and allow all three inside. This decision proved wise, as the temple was swarming with Dark Jedi, Sith Masters, acolytes, and battle droids left behind by Darth Malak and Revan during their initial entry. They uncovered an ancient computer terminal that revealed the secrets of the Star Forge and the method to disable the disruptor field that had stranded them on Rakata Prime. When the redeemed Jedi Revan reached the summit to deactivate the shield, preventing the Ebon Hawk from taking off, along with Bindo and Juhani, they encountered an unexpected figure: their former companion Shan, now corrupted by the dark side.

Shan's reunion with Revan, Bindo, and Juhani at the Temple's summit occurred under unforeseen circumstances. Shan revealed that, after enduring torture, she had pledged allegiance to Malak and become his apprentice, vowing to assist Malak in conquering the galaxy. She engaged all three in a lightsaber duel, but the three Jedi proved to be superior. Shan unleashed a Force wave to escape defeat.
Witnessing Revan's power despite the Council's actions, she concluded that Revan deserved to be the Dark Lord of the Sith. Shan attempted to persuade him to reclaim his former title and accept her as his apprentice, reminding Revan of the Jedi Council's misdeeds. Revan confronted the dark legacy of his past self, facing a pivotal decision. Shan reminded him that she could sense his thoughts through their bond. Revan countered that their connection extended beyond the bond, encompassing their love for each other. Shan dismissed this, asserting that only the Force and power connected them. Shan implored Revan to join her, reclaim the Sith Empire, and avenge Malak's betrayal. Revan questioned how he could trust her after her betrayal. Shan declared that she would no longer deny herself anything, vowing to stand by his side as his lover and apprentice, defeating Malak together. Revan, strengthened by Bindo and Juhani, rejected Shan's offer of power. Enraged by her failure, Shan retreated to the Star Forge, where she and Revan would have their final battle.
Revan deactivated the disruptor field. He and his crew repaired the Ebon Hawk and pursued Shan to the Star Forge as a Republic Fleet emerged from hyperspace and initiated an assault on the Star Forge. The surviving Jedi from Dantooine's destroyed enclave boarded the Star Forge, hoping to disrupt Bastila's battle meditation so the Republic capital ships could close in on the space station to destroy it. Aboard the Star Forge, Revan demonstrated his restored Force affinity and lightsaber combat mastery, nearly single-handedly defeating Malak's army of Star Forge battle droids and Dark Jedi. In the Star Forge's command center, Revan confronted Shan alone. Despite drawing strength from the Star Forge, Revan prevailed. She begged Revan to kill her, but Revan attempted to redeem her by invoking their shared love. He succeeded, and Shan used her battle meditation to aid the Republic, turning the tide of the climactic battle. Revan then defeated his former apprentice and saved the galaxy.

Revan accepted Bastila Shan's offer and struck down the Jedi Jolee Bindo and Juhani (only Jolee if Juhani had been killed on Dantooine), their blood staining the temple stone, symbolizing Revan's return to power. He returned to the Ebon Hawk and explained Bindo and Juhani's absences to his stunned companions. Revan and Bastila offered the rest of the team the chance to join them. The droids HK-47 and T3-M4 were programmed to do so, and Canderous Ordo pledged his loyalty to the man he believed would bring him battles in which he could find the honor he had been looking for, as he had in the Mandalorian Wars. Mission Vao refused to believe that Revan had returned to the dark side and did not run away. Zaalbar initially agreed to join the dark side as he owed Revan a life debt and even agreed (via a mind trick from Revan) to kill Mission to prove his loyalty. (Note that the player could fail to persuade Zaalbar to attack Mission; in this case, the player must personally engage Mission, and kill Zaalbar as well.)
Before approaching the Star Forge, Shan tricked the Republic to into attacking the Sith fleet there as a preliminary measure to defeat the Republic. The Republic believed that she would use her battle meditation against the Sith, but she turned it against them just before Revan faced Malak. Master Vandar Tokare realized the truth just after Shan applied her battle meditation against the Jedi, but could do nothing to stop her. On the Command Deck Revan faced Malak's three most powerful Dark Jedi (each with different robes). Malak promised that the one who delivered the killing blow to Revan would become his new apprentice. Revan and Bastila fought and killed all three of them. After Revan defeated Malak, he re-assumed the title of Dark Lord of the Sith and made Shan his apprentice and lover. Together, they set out to conquer the galaxy.
Using the resources he now commanded as Master of the Star Forge, Darth Revan created an infinite fleet that rolled forth to crush the Republic. Surprisingly, however, Darth Revan soon halted his offensive. It was noted as odd that Revan deliberately avoided striking the Republic's manufacturing facilities in his previous war, and again that he seemingly ended the Star Forge's production of vessels early.
Shortly after defeating Malak, Darth Revan returned to Korriban, in an effort to unite the Sith to crush the Republic once and for all.During his time on Korriban, Darth Revan started recovering his lost memories, eventually recovering all of his former memories and remembering the threat that he discovered during the Mandalorian Wars, fearing that might threaten his power, so one day he left mysteriously, leading his empire to its downfall.
Bereft of a strong dark side user to guide it, the Star Forge went dormant, stopping all production and activity, after misuse from lesser Sith Lords who tried to tap into its power. Before his departure, Darth Revan confessed his fears and thoughts to Shan.
However, Bastila Shan installed secret commands into T3-M4. She knew that Revan would not take her into the Unknown Regions, fearing their bond would be a weakness to him. She also knew that Revan would take T3. She ordered the droid to return to known space should something happen to Revan. If T3 was unable to locate her, the droid was to find anyone, Sith or Jedi, who could help. She ordered T3 to keep this last command a secret from her master Revan.
Shan, left behind, seeing disorder among the Sith—and seeing none left with the power to control the Star Forge, devouring those too weak to harness its power—realized that Revan never intended to keep the Star Forge operational. She recorded her concerns in a Sith holocron placed in the Sith Academy on Korriban—shortly before the Sith Empire, along with most of the Order, completely collapsed. At the end of the holocron, Shan stated that she was leaving for the Unknown Regions to find and bring Revan back. It had not yet been proven if she left before Korriban fell into ruin, or died there before leaving.
It was assumed that Darth Revan visited all his former strongholds searching for something that is was not readily apparent. It is known, however, that he headed for the Unknown Regions with the intent of stopping something menacingly powerful, something that was apparently responsible for initially coercing the Mandalorians to invade. Revan's former Master, Kreia, suggested that Revan was searching for the original Sith Empire, believed to be destroyed in the Great Hyperspace War.