The galaxy is in the midst of a civil war. Rebel spies have stolen plans to the Galactic Empire's Death Star, a colossal space station capable of destroying an entire planet. Princess Leia, one of the Rebellion's leaders, has obtained the plans, but her starship is captured by an Imperial Star Destroyer under the command of the ruthless Darth Vader. Before she is captured, Leia hides the plans in the memory of astromech droid R2-D2, who, along with protocol droid C-3PO, flees in an escape pod to the desert planet below the starships, Tatooine.
The droids are captured by Jawa traders, who sell them to moisture farmers Owen and Beru Lars and their nephew Luke Skywalker. While cleaning R2-D2, Luke accidentally triggers a holographic recording of Leia, in which she requests help from Obi-Wan Kenobi. The next morning, Luke finds R2-D2 missing, and encounters "Old Ben" Kenobi, a hermit who reveals himself as Obi-Wan. He tells Luke of his days as one of the Jedi Knights, former peacekeepers of the Galactic Republic who derived their power from an energy field called the Force until being all but wiped out by the Empire. Contrary to what his uncle has told him, Luke learns that his father fought alongside Obi-Wan as a Jedi Knight until Vader, a former pupil of Obi-Wan's, turned to the dark side of the Force and murdered him. Obi-Wan presents Luke with his father's old weapon: a lightsaber.
R2-D2 plays Leia's message for Obi-Wan, in which she begs him to take the Death Star plans to her home planet of Alderaan and give them to her father for analysis. Obi-Wan invites Luke to accompany him to Alderaan and learn the ways of the Force. Luke declines, but changes his mind after discovering that Imperials have killed his aunt and uncle and destroyed their farm. Obi-Wan and Luke visit a cantina in Mos Eisley, where, after a brief confrontation, they meet smuggler Han Solo and his Wookiee co-pilot Chewbacca. After negotiating a price, they join forces aboard Han's ship, the Millennium Falcon.
The group discovers that Alderaan has been destroyed by the Death Star's superlaser—a show of force on order of the commanding officer, Grand Moff Tarkin. The Falcon is captured by the Death Star's tractor beam, which Obi-Wan goes to disable. Luke discovers that Leia is imprisoned on the Death Star, and rescues her with the help of Han and Chewbacca in a swashbuckling series of escapes. After Obi-Wan sacrifices himself in a lightsaber duel with Darth Vader to enable the heroes to escape, the Falcon escapes amid a fierce dogfight with Imperial TIE starfighters. Using a tracking beacon placed aboard the Falcon, the Imperials follow the rebels to the hidden base on Yavin 4.
The Death Star plans reveal that it can be destroyed by triggering a chain reaction from an external exhaust port. Luke joins the Rebel fighter squadron, while Han collects his payment, intending to leave. In the ensuing battle, the Rebels suffer heavy losses after several unsuccessful runs. Vader leads a squadron of TIE fighters and prepares to attack Luke's X-wing, but Han returns and fires at the Imperial fighters, sending Vader spiraling away. Guided by Obi-Wan's spirit, Luke turns off his targeting computer and uses the Force to destroy the Death Star just before it can fire on the Rebel base. On Yavin 4, Leia awards Luke and Han with medals for their heroism.