A day after the events of Star Wars: Episode VI Return of the Jedi, C-3PO and R2-D2 are helping the Rebels clean up after the victory celebration on Endor. The two droids are planning to depart on a mission to liberate the lost battle droids of Mandalore with Admiral Ackbar, who owns a blue Delta-7B Aethersprite-class light interceptor called the Daisy Mae. Upon hearing 3PO's stories about his father 30 years ago, Luke Skywalker expresses his desire to hear the droid's history before the formation of the Galactic Empire, but 3PO sadly confesses that his memory was wiped. Only when R2 shows up with a junkdrive containing his memories prior to the rise of the Empire does 3PO tell his story.
3PO begins with the day he was created by a young Anakin Skywalker, who flames at his mother for not serving his PB&J properly ("I find your lack of white bread disturbing." he glares). Concurrently, Queen Padmé Amidala and her Jedi guardians Qui-Gon Jinn and Obi-Wan Kenobi were escaping the Trade Federation's occupation of Naboo. Turbolaser fire from the Federation blockade damages the ship's hyperdrive, in the process sending Jar Jar Binks into the vacuum of space. After a brief repair on the hyperdrive, thanks to R2, her starship runs out of fuel and crash lands on Tatooine, where Qui-Gon, R2 and the queen (disguised as a handmaiden) visit a junk shop where they meet Anakin and 3PO. Because of Anakin's Force-sensitivity, Qui-Gon offers him a chance at freedom from slavery, while his owner, Watto, loudly sells red flags in the background (a comedic foreshadowing at the outcome of Qui-Gon's decision).
Anakin enters the Boonta Eve Classic, where he wins the race, earning enough money to buy the hyperdrive and leaving Shmi and 3PO behind. Back at the crashed starship, Obi-Wan informs the others that the Trade Federation is attacking the capitol of Naboo with its droid army, and Padmé declares that she will protect her people no matter the cost.
Back at Theed, Anakin flies up to participate in the fight to destroy the droid control ship, while Qui-Gon and Obi-Wan are confronted by Darth Maul, who crushes Qui-Gon to death with a pile of rubble from the hangar ceiling. As he struggles vainly to free himself from the debris (with only his left arm shown), Qui-Gon begs Obi-Wan to train Anakin as the Padawan and Maul battle in the generator complex, where Obi-Wan slices off Maul's legs in a comedic fashion.
Afterwards, the citizens of Theed celebrate their victory. Obi-Wan, under pressure from Anakin's glaring attitude, promises to begin his training today. Palpatine intends to watch Anakin's career with "great interest" and Padmé hopes to see more of Anakin sometime in the future. However, their farewell is interrupted by Watto, who appears out of nowhere with a flashing danger sign (another foreshadowing at the outcome of their relationship).
In the present, 3PO prepares to share his account of Anakin and Padmé's wedding, but his audience is uninterested, and, tipped off by Admiral Ackbar, would rather hear the mythos of the Clone Wars instead. Ten years later, Obi-Wan and Anakin (now a "headstrong Padawan" as 3PO describes) are greeted by Padmé and her four decoys before her ship is blown up by Jango Fett, who throws darts at Anakin, but misses. After confessing his need for a jet pack, Anakin and Obi-Wan have a row and it is decided by the Jedi Council that Obi-Wan will investigate Kamino while Anakin is stuck on Coruscant with Padmé.
Once there, Obi-Wan encounters a cloning facility and Jango Fett himself. They fight, and he follows the bounty hunter to Geonosis. Back on Coruscant, Anakin explains his situation to Padmé, who tries to calm him down to no avail. After getting a distress message from Obi-
Wan, Anakin and R2 hitch a ride aboard Padmé's yacht to rescue him, where they meet 3PO again. When Anakin asks how he got there, the protocol droid meekly replies, "It is a rather long story, I'm afraid."
Anakin, Padmé, R2 and 3PO find themselves in the vicinity of a battle droid factory, where they are tossed onto the conveyer belt. A Game Boy–styled sequence ensues, depicting R2 helping the others before they are captured by the droids. They join the Jedi in the execution arena, and the clones, led by Yoda, save them from further harm. Yoda later encounters Count Dooku, only to have the former "show off" with some circus tricks instead of duel. Then Dooku exits the battle and presents the plans for the Death Star to Darth Sidious.
Back in the present, as 3PO finishes his story, R2 is kidnapped by a mysterious captor, who takes off with the droid in Ackbar's stolen Delta-7B starfighter. 3PO and Ackbar hurry off to rescue him in another ship.
Qui-Gon Jinn got crushed to death instead of impaled by Darth Maul.