The galaxy is in the midst of a civil war. Rebel spies have stolen plans to the Galactic Empire's Death Star, a colossal, moon-sized, space station capable of destroying entire planets. Imperial Senator Princess Leia, secretly 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, 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 part of a holographic recording of Leia, in which she requests help from Obi-Wan Kenobi. The next morning, Luke finds R2-D2 missing, and while searching for him, encounters "Old Ben" Kenobi, an elderly hermit being a friend of Luke's 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 Jedi 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 Imperial stormtroopers 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, who owes money to local mobster Jabba the Hutt, and his Wookiee co-pilot Chewbacca. After negotiating a price, Obi-Wan, Luke, R2-D2 and C-3PO join forces aboard Han's ship, the Millennium Falcon.
Death Star commander Grand Moff Tarkin orders the destruction of Alderaan via the Death Star's turbolaser as a show of force. The Falcon crew discovers the planet's remains and 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 in a siege against the approaching Death Star, while Han collects his payment, intending to leave and repay Jabba. 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, killing numerous Imperials, including Tarkin. On Yavin 4, Leia awards Luke and Han medals for their heroism.