Luke Skywalker initiates a plan to rescue Han Solo from the crime lord Jabba the Hutt with the help of Princess Leia, Lando Calrissian, Chewbacca, C-3PO, and R2-D2. Leia infiltrates Jabba's palace on Tatooine, disguised as a bounty hunter, with Chewbacca as her prisoner. Leia releases Han from his carbonite prison, but she is captured and enslaved. Luke arrives soon afterward, but is also captured after a tense standoff. After Luke survives his battle with Jabba's Rancor, Jabba sentences him and Han to death by feeding them to the Sarlacc. Luke frees himself and battles Jabba's guards. During the chaos, Leia strangles Jabba to death, and Luke destroys Jabba's sail barge as the group escapes. While the others rendezvous with the Rebel Alliance, Luke returns to Dagobah where he finds that Yoda is dying. Before he dies, Yoda confirms that Darth Vader, once known as Anakin Skywalker, is Luke's father, and that there is "another Skywalker". Luke realizes that Leia is his twin sister and the spirit of Obi-Wan Kenobi confirms this. Obi-Wan tells Luke that he must fight Vader again to defeat the Empire.
The Rebel Alliance learns that the Empire has been constructing a new Death Star under the supervision of Emperor Palpatine himself. As the station is protected by an energy shield, Han leads a strike team to destroy the shield generator on the forest moon of Endor; doing so would allow a squadron of starfighters to destroy the Death Star. The strike team, accompanied by Luke and Leia, travels to Endor in a stolen Imperial shuttle. On Endor, Luke and his companions encounter a tribe of Ewoks and, after an initial conflict, gain their trust. Later, Luke tells Leia that she is his sister, Vader is their father, and that he must go and confront him. Surrendering to Imperial troops, Luke is brought to Vader and unsuccessfully tries to convince him to turn from the dark side of the Force.
Vader takes Luke to the Death Star to meet the Emperor, intent on turning him to the dark side. The Emperor reveals that the Death Star is actually fully operational and the rebel fleet will fall into a trap. On Endor, Han's strike team is captured by Imperial forces, but a surprise counterattack by the Ewoks allows the rebels to battle the Imperials. Meanwhile, Lando, piloting the Millennium Falcon, leads the rebel fleet to the Death Star, only to find out that the shield is still active, and the Imperial fleet is waiting for them. The Emperor tempts Luke to give in to his anger, and Luke engages Vader in a lightsaber duel. Vader senses that Luke has a sister, and threatens to turn her to the dark side. Enraged, Luke attacks Vader and severs his prosthetic right hand. The Emperor entreats Luke to kill Vader and take his place, but Luke refuses, declaring himself a Jedi as his father had been. Furious, the Emperor tortures Luke with Force lightning. Unwilling to let his son die, Vader throws the Emperor down a reactor chute to his death, but Vader is mortally electrocuted in the process. At his last request, Luke removes the redeemed Anakin's mask before he dies peacefully in Luke's arms.
As the battle between the Imperial and Alliance fleets continues, the strike team defeats the Imperial forces and destroys the shield generator, allowing the rebel fleet to launch their assault on the Death Star. Lando leads a group of rebel ships into the Death Star's core and destroys the main reactor. As Luke escapes on a shuttle with his father's body, the Falcon flies out of the Death Star's superstructure as the station explodes. On Endor, Leia reveals to Han that Luke is her brother, and they kiss. Luke returns to Endor and cremates Anakin's body on a pyre. As the rebels celebrate their victory over the Empire, Luke smiles as he sees the spirits of Obi-Wan, Yoda, and Anakin watching over them.