This futuristic sci-fi thriller follows the adventures of Luke Skywalker, as he 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 and releases Han from his carbonite prison, but she is captured and enslaved.
Luke arrives soon afterward and allows himself to be captured. After Luke survives a battle with Jabba's Rancor, Jabba sentences Luke and Han to death by being fed to the sarlacc. Luke breaks free and a large battle ensues, during which Leia strangles Jabba to death, Han inadvertently knocks Boba Fett into the gaping maw of the sarlacc, and Luke destroys Jabba's sail barge.
While Han and Leia rendezvous with the Rebel Alliance, Luke returns to Dagobah where he finds that Yoda is dying. With his last breaths, Yoda confirms that the evil Darth Vader, once known as Anakin Skywalker, is Luke's father; he also mentions "another Skywalker". The spirit of Obi-Wan Kenobi confirms Luke's insight that the "other" Yoda spoke of is Luke's twin sister, Leia. Obi-Wan then 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 Vader and his master, Emperor Palpatine. In a plan to destroy the new weapon, Han leads a strike team to destroy the battle station's shield generator on the forest moon of Endor, allowing a squadron of starfighters to enter the incomplete infrastructure and destroy the station from within.
The strike team, with Luke in tow, travels to Endor in an Imperial shuttle; sensing Vader's presence, Luke fears he is endangering the mission. On Endor, Luke and his companions encounter a tribe of Ewoks and, after an initial conflict, form a partnership with them. Later, Luke confesses to Leia that she is his sister, Vader is their father, and that he is leaving to 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 Palpatine, intent on turning his son to the dark side. Palpatine reveals the Death Star is fully operational and set to destroy the Rebellion. On Endor, Han's strike team is captured by Imperial forces, but a surprise counterattack by the Ewoks allows the Rebels to launch an attack.
Meanwhile, Lando leads the Rebel fleet in the Millennium Falcon to the Death Star, only to find that the station's shield is still active and the Imperial fleet is waiting for them. Palpatine tempts Luke to give in to his anger and join the dark side of the Force, and Luke engages Vader in a lightsaber duel. Vader discovers that Luke has a sister, and threatens to turn her to the dark side.
Enraged, Luke attacks Vader and severs his father's right hand. Palpatine entreats Luke to kill Vader and take his place, but Luke refuses, declaring himself a Jedi. Furious, Palpatine tortures Luke with Force lightning. Unwilling to let his son die, Anakin Skywalker reemerges and kills Palpatine, therefore fulfilling the prophecy that he would be the one to destroy the Sith and bring balance to the force, but is mortally electrified in the process.
At his father's request, Luke removes Anakin's mask to see his scarred visage, allowing Anakin to look on his son with his own eyes before dying in Luke's arms.
On Endor, the strike team defeats the Imperial forces and destroys the shield generator base, allowing the Rebel fleet to launch a final assault on the Death Star. Lando leads the remaining ships into the station's core and destroys the main reactor. Luke escapes on an Imperial shuttle with his father's body, while Lando escapes in the Falcon moments before the Death Star explodes.
Also, Leia reveals to Han that Luke is her brother, and they share a kiss. Luke returns to Endor and cremates his father's armor on a funeral pyre. As the Rebels celebrate the end of the Empire, Luke sees the spirits of Obi-Wan, Yoda, and Anakin watching over them.