In 4 ABY, Darth Vader was sent to the incomplete Death Star II to await the Emperor, who was coming for an inspection tour. After Palpatine's arrival, Vader 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 his son, 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.
Arriving on the eve of Luke's capture, Vader once again attempted to persuade Luke to join the dark side, but this time Vader's interests were tinged by a desire to protect his son. When this failed, Vader took him to Emperor Palpatine himself on the incomplete Death Star II. Luke reluctantly fought a lightsaber battle with Vader, matching Vader's mastery of Form V with his own display of Form V blade work, all the while attempting to persuade his father 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 his father 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 his father. Vader, who had been probing Luke's thoughts, discovered that besides Luke he also had a daughter: Leia Organa, Luke's twin sister. Vader, 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 Vader with anger and hatred. Finally, Luke sliced off Vader's mechanical right hand, defeating the Dark Lord. Palpatine, cackling with triumph, urged Luke to fulfill his destiny, and take his father's place at the Dark Lord's side. Vader then realized that he had been betrayed by Darth Sidious, just as Darth Tyranus had been betrayed twenty three years before.
Luke looked down to see his father's right severed arm, and, seeing that it was mechanical like his, he realized that he was about to become Vader's successor. Horrified at what he was about to do, Luke used a combination of Obi-Wan'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 his father before him. 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 Vader, in no condition to battle, could do no more than watch as Luke Skywalker lay dying.
But Anakin never forgot the pain Count Dooku had once inflicted upon him with the lethal power of Force lightning, and could not bear to see his son in such agony. He had been unable to save his mother, he had let Mace Windu die under his Master's power many years before, he had murdered hundreds of Jedi, he had lost his best friend, he thought he unwittingly killed his wife, but he could save his son. Anakin Skywalker would not stand by and let his son fall. From this moment on, Darth Vader was no more, and Anakin Skywalker was reborn.
In a final effort of self-sacrifice, Anakin literally overthrew his Master, lifting him off the ground with his great strength, and casting him down the Death Star's reactor shaft to his death. However, it was at the cost of his own life. Anakin was badly wounded in the process by the Emperor's Force lightning, and his breathing apparatus short-circuited. Yet this single act brought him back to the light side.
Luke, attempting to save his father's life, dragged the dying Anakin to the hangar where his shuttle lay. Anakin, knowing that he would die whether or not Luke managed to get him onto a ship, stopped his son.
Nearing death, Anakin asked Luke to help him remove his mask, so that he could see his son with his own eyes, not through the lens filters of his mask. Luke helped disconnect the mask and saw his father's face for the first time. Beneath, Anakin Skywalker was bald, his hair follicles having been incinerated in Mustafar's flames, and the wounds from Mustafar's heat had not yet healed. However, his eyes were no longer the burning yellow of a Sith Lord, but the shining blue of his former self. Anakin 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, Anakin Skywalker died and became one with the Force. His last words behind the mask of Vader were especially telling as well-in response to Luke's protest that he would die without the mask, Vader responded "Nothing can stop that now." 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 his father's armor and artificial remains, and reached the forest moon of Endor where Darth Vader's armor was cremated in the manner of a Jedi, since Anakin's body had passed into the light. During the celebration, Luke saw a vision of a forgiven Anakin; whole, and without the artificial body of Vader. Obi-Wan Kenobi and Yoda were next to him. His destiny fulfilled, Anakin Skywalker had passed on into the embrace of the light side of the Force.