Stranded on the planet Tatooine after rescuing Queen Amidala (Natalie Portman) of Naboo, Jedi apprentice Obi-Wan Kenobi (Ewan McGregor) and his Jedi Master Qui-Gon Jinn (Liam Neeson) discover nine-year-old Anakin Skywalker, a young slave. Gifted with the power of the Force, Anakin wins his freedom and leaves home to be trained as a Jedi. Back on Naboo, Anakin and the Queen face a massive invasion while the two Jedi confront a lethal foe named Darth Maul. They soon realize the invasion is part of a sinister scheme by forces of darkness known as the Sith.
Supreme Chancellor Valorum, leader of the Galactic Republic, dispatches Jedi Master Qui-Gon Jinn and his apprentice Obi-Wan Kenobi to negotiate with the Trade Federation leadership to end a blockade of battleships around the planet Naboo. Darth Sidious, a Sith Lord and the Trade Federation’s secret adviser, orders Federation Viceroy Nute Gunray to kill the Jedi and invade Naboo with an army of battle droids. The Jedi flee to Naboo, where Qui-Gon saves Gungan outcast Jar Jar Binks from being killed during the invasion. Indebted to the Jedi, Jar Jar leads them to an underwater Gungan city. The Jedi try but fail to persuade the Gungan leader, Boss Nass, into helping the people of Naboo, though they are able to obtain transportation to Theed, the capital city on the surface. They rescue Queen Amidala, the ruler of the Naboo people, and escape the planet on her royal starship, which is damaged as they pass the Federation blockade.
Amidala’s ship is unable to sustain its hyperdrive and lands for repairs on the desert planet Tatooine. Qui-Gon, Jar Jar, astromech droid R2-D2, and Amidala (in disguise as a handmaiden) visit the settlement of Mos Espa to buy new parts at a junk shop. There they meet the shop’s owner Watto and his nine-year-old slave Anakin Skywalker, who is a gifted pilot and engineer, and has created a protocol droid called C-3PO. Qui-Gon senses a strong presence of the Force within Anakin and is convinced that he is the “chosen one” of Jedi prophecy who will bring balance to the Force. Qui-Gon wagers Anakin’s freedom with Watto in a Podrace, which Anakin wins. Anakin joins the group to be trained as a Jedi, leaving his mother Shmi behind. En route to their repaired starship, Qui-Gon enters a brief lightsaber duel with Darth Maul, Darth Sidious’ Sith apprentice who was sent to capture Amidala.
The Jedi escort Amidala to the Republic capital planet Coruscant so she can plead her people’s case to Chancellor Valorum in the Galactic Senate. Qui-Gon asks the Jedi Council to train Anakin as a Jedi, but the Council are concerned that Anakin is vulnerable to the dark side of the Force and decline. Undaunted, Qui-Gon vows to train Anakin himself. Meanwhile, Naboo senator Palpatine persuades Amidala to make a vote of no confidence in Valorum to elect a more capable chancellor to resolve the crisis on Naboo. Though she pushes for the vote, Amidala grows frustrated with the corruption in the Senate and decides to return to Naboo with the Jedi.
On Naboo, Padmé reveals herself to the Gungans as Queen Amidala and persuades them into an alliance against the Trade Federation. Jar Jar leads his people in a battle against the droid army while Padmé leads the hunt for Gunray in Theed. In a starship hangar, Anakin enters a vacant starfighter and inadvertently triggers its autopilot, joining the battle against the Federation droid control ship in space. Anakin ventures into the ship and destroys it from within, deactivating the droid army. Meanwhile, Qui-Gon and Obi-Wan battle Darth Maul, who mortally wounds Qui-Gon before being bisected by Obi-Wan. As he dies, Qui-Gon asks Obi-Wan to train Anakin. Subsequently, Palpatine is elected as the new Supreme Chancellor and Gunray is arrested. The Jedi Council promotes Obi-Wan to Jedi knighthood and reluctantly accepts Anakin as Obi-Wan’s apprentice. At a festive ceremony, Padmé presents a gift of appreciation and friendship to the Gungans.