In 4 ABY, Starkiller was sent to the incomplete Death Star II to await the Emperor, who was coming for an inspection tour. After Palpatine's arrival, Starkiller was sent to command the Imperial Fleet guarding the Death Star, keeping it on the far side of Endor. It was here that he sensed the arrival of Luke Skywalker along with the Rebel strike team coming to destroy the shield generator that protected the Death Star. When he informed the Emperor of this, Palpatine advised him to go to Endor and await Luke.
During his departure to Endor, Starkiller looked back on his life and had the first dream he had had in many years. This was following visions that he thought were premonitions of the near future.
Arriving on the eve of Luke's capture, Starkiller once again attempted to persuade Luke to join the dark side, but this time Starkiller's interests were tinged by a desire to protect the young Jedi. When this failed, Starkiller took him to Emperor Palpatine himself on the incomplete Death Star II. Luke reluctantly fought a lightsaber battle with Starkiller, matching Starkiller's mastery of Form VII with his own display of Form V blade work, all the while attempting to persuade Starkiller into renouncing the dark side of the Force. In allowing this to happen, Luke Skywalker risked everything in order to assure the victory of the Rebel Alliance and the redemption of Starkiller to the light.
During this time, Palpatine relentlessly attempted to lure Luke to the dark side, tormenting him with thoughts of the defeat of the Rebel Alliance and the death of his friends. However, Luke continued to attempt to restrain himself from fighting Starkiller. Starkiller, who had been probing Luke's thoughts, discovered that besides Luke, Vader had also had a daughter: Leia Organa, Luke's twin sister. Starkiller, happy at this new information he had acquired, decided to use this knowledge against Luke, threatening to corrupt Leia. Luke, enraged, ignited his lightsaber and viciously attacked Starkiller with anger and hatred. Finally, Luke sliced off Starkiller's right hand, defeating the Dark Lord. Palpatine, cackling with triumph, urged Luke to fulfill his destiny, and take Starkiller's place at the Dark Lord's side. Starkiller then realized that Sidious had betrayed him again, just as Darth Tyranus had been betrayed twenty-three years before, and just as Vader had been betrayed by Sidious for Starkiller six years earlier.
Luke looked down to see Starkiller's severed right hand, and, seeing that it was mechanical like his, he realized that he was about to become Starkiller's successor. Horrified at what he was about to do, Luke used a combination of Kenobi's and Yoda's teachings and the light side of the Force to calm himself down. Luke tossed his lightsaber away, refusing the Emperor's offer to join him as his new apprentice, declaring that he was a Jedi like Galen Marek, using Starkiller's real name. Enraged at the failure of his plans, the Emperor unleashed a barrage of Force lightning attacks upon Luke. Defiant to the end, Luke suffered the wrath of Palpatine, and Starkiller, in no condition to battle, could do no more than watch as Luke Skywalker lay dying.
Marek had never forgotten the pain that Palpatine had once inflicted upon him with the lethal power of Force lightning, and could not bear to see another person in such agony. He had been unable to save his father, he had let Rahm Kota and the other rebel leaders die, he had murdered hundreds of Jedi, he had denied Vader redemption, he had lost his beloved Juno Eclipse, but he could save Skywalker. Galen Marek would not stand by and let anyone else. From this moment on, Starkiller was no more, and Galen Marek was reborn.
Refusing to watch yet another person die, Marek suddenly grabbed Sidious from behind and hoisted him from his feet. In a final effort of self-sacrifice, Marek stubbornly advanced; ignoring the agony his former master's Force lightning inflicted him as he went for the Death Star's reactor shaft. Staggering to his destination, he threw Darth Sidious down the shaft to his death before collapsing. Mortally weakened by the lightning, and with his life support system short-circuited and fried, Galen Marek had paid for his act of defiance with his life. Yet this single act brought him back to the light side.
Luke, attempting to save Galen's life, dragged the dying Marek to the hangar where his shuttle lay. Marek, knowing that he would die whether or not Luke managed to get him onto a ship, stopped him.
Nearing death, Marek asked Luke to help him remove his mask, so that he could see a true Jedi with his own eyes, not through the lens filters of his mask. Luke helped disconnect the mask and saw Marek's for the first time. Beneath, Galen Marek was bald, his hair follicles having been incinerated by the Rogue Shadow's engines, and the wounds from his fight on the Death Star I had not yet healed. However, his eyes were no longer the burning yellow of a Sith Lord, but the deep brown of his former self. Marek told Luke that he was right about him, there was good still in him; and to tell his sister, Leia, the same. With these last words, Galen Marek died and became one with the Force. His last words behind the mask of Starkiller were especially telling as well—in response to Luke's protest that he would die without the mask, Marek responded "Nothing can stop that now. Just for once, let me look at a real Jedi with my own eyes." These words constituted a final rejection of the lying promises of his master Darth Sidious, and a full embrace of the light side of the Force once again.
Luke escaped the exploding Death Star in a shuttle along with Marek's armor and artificial remains, and reached the forest moon of Endor where Starkiller's armor was cremated in the manner of a Jedi, since Marek's body had passed into the light. During the celebration, Luke saw a vision of a forgiven Marek; whole, and without the artificial body of Starkiller. Kota, Kenobi and Yoda were next to him. His destiny fulfilled, Galen Marek had passed on into the embrace of the light side of the Force.