Ten years have passed, and the Galactic Republic is in crisis. A separatist movement secretly led by former Jedi Master Count Dooku is threatening the peace, causing the Galactic Senate to debate a Military Creation Act to form a standing army for the Republic's protection. Senator Padmé Amidala, former Queen of Naboo, returns to Coruscant to vote against the Act, even though there are no longer enough Jedi to maintain peace and justice in the galaxy.
Upon her arrival on Coruscant, she narrowly escapes an assassination attempt that claims the life of her decoy, Cordé. As a result, Supreme Chancellor Palpatine requests that Jedi Knight Obi-Wan Kenobi and his apprentice, Anakin Skywalker protect her.
That night, the assassin Zam Wesell makes another attempt on Amidala's life, though the Jedi are able to foil her plot. They pursue the assassin through Galactic City, though she is killed by a saberdart, fired by a mysterious "rocket man", before the Jedi can learn the name of her employer. Returning to the Jedi Temple, Obi-Wan is given a new assignment by the High Council; to track down the assassin's killer. Meanwhile, Anakin continues his assignment of protecting the Senator, and is asked to escort her back to her home planet of Naboo. Further, he has become infatuated with Padmé, and relishes the chance to spend time with her. Representative Jar Jar Binks assumes the Senator's duties in her absence.
During the investigation, Obi-Wan is led to a mysterious planet called Kamino — missing from the Jedi Archives — where he discovers a secret clone army being developed for the Republic. He is told by Prime Minister Lama Su that the army was ordered some ten years ago by Jedi Master Sifo-Dyas — although Obi-Wan knows Sifo-Dyas was killed before that time. A bounty hunter named Jango Fett was hired as the template for the clones. Obi-Wan meets Jango on Kamino, and believes him to be the killer he has been tracking. After unsuccessfully trying to capture Jango Fett, Obi-Wan places a homing beacon on his ship, Slave I, and follows him to the planet of Geonosis.
On Geonosis, Obi-Wan overhears a meeting between Count Dooku and the leaders of the commerce guilds, and learns that they are behind the separatist movement and have built up a new droid army. He also learns that it was Nute Gunray who ordered the assassination of Amidala, as revenge for the defeat of the Trade Federation at the Battle of Naboo. Obi-Wan transmits his findings to the Council, though he is surrounded by droidekas and captured before he can finish his report.
Meanwhile, Anakin and Padmé have been spending much time together on Naboo, and Anakin reveals his deep love for her, vowing to do whatever she asks. However, Padmé resists, explaining that it would be impossible for the two of them to be together, since she is a Senator and he is a Jedi. Anakin is angered by this, and experiences inner conflict between his strong desires for her and his duties as a Jedi.
Anakin is also troubled by a dream that his mother is in grave danger, and he beckons for Padmé to accompany him to his home planet of Tatooine — in the process disobeying Obi-Wan's orders to remain on Naboo. Upon arriving, he learns that his mother has married a moisture farmer named Cliegg Lars, and travels to the Lars homestead. There, he learns that his mother was kidnapped a month ago by the Tusken Raiders. He travels through the night, and finds her tied and beaten beyond help in a Tusken camp. After a tender exchange between each other, Shmi dies in Anakin's arms. Overwhelmed by a murderous rage, he slaughters the entire Tusken community; men, women and even children. Back at Coruscant, Yoda senses a terrible darkness in the Force as the slaughter continues (Qui-Gon Jinn's voice can also be heard saying "Anakin, Anakin, No!" during this scene). Anakin then brings his mother's body back to the homestead, where her funeral is held.
Now that the Jedi Council knows of Dooku's army, Jedi Master Mace Windu leads a team to Geonosis. Unbeknownst to them, Anakin and Padmé also make their way there to rescue Obi-Wan. Meanwhile, Representative Binks calls for Chancellor Palpatine to be given emergency powers, with which he can call the recently discovered clone army into battle.
Back on Geonosis, Count Dooku tries to persuade Obi-Wan to join him, warning him that Darth Sidious is now in control of the Senate. Obi-Wan refuses to believe him, saying that the Jedi would have known if that was the case. Anakin and Padmé arrive on the planet, but are quickly captured and sentenced to death, joining Obi-Wan in the Petranaki arena where they are to be executed. The pair confess their love for each other before they are dragged into the arena and forced to battle a reek, a nexu, and an acklay. During their struggle, Mace Windu arrives with his Jedi team, and they battle Dooku's droids in the arena. Even though Windu kills Jango Fett, defeat for the Jedi seems imminent. However, Yoda unexpectedly arrives with the Republic's new clone army, descending upon the arena in gunships and picking up Padmé and the surviving Jedi.
A large battle erupts between the Republic's clone army and the Droid Army of the Confederacy of Independent Systems. Geonosian Archduke Poggle the Lesser entrusts Count Dooku with the plans for the Ultimate Weapon, which is early plans for the Death Star. Dooku attempts to escape, but Obi-Wan and Anakin track him to a secret hangar, where they engage him in combat. Unfortunately, they are no match for Dooku's mastery of the Force and the lightsaber combat style that Dooku employs. He injures Obi-Wan and cuts off Anakin's right arm. Yoda appears just as Dooku is about to finish them off, and the two masters of the Force go head to head in a fierce duel. Dooku, realizing he cannot defeat Yoda, attempts to topple a large pillar on Obi-Wan and Anakin as a distraction. While Yoda uses the Force to divert the pillar, Dooku flees in his solar sailer. Flying to an industrial sector of Coruscant, he meets up with his master, Darth Sidious, who is pleased that the war has begun as planned.
In the Jedi Temple, Obi-Wan, Mace and Yoda muse on Dooku's warning that Darth Sidious is controlling the Senate. Yoda is hesitant to believe this, stating that the Sith's nature is to create fear and mistrust. He and Windu agree that they should nevertheless closely monitor the Senate. When Obi-Wan mentions that the Clones were key to the victory, Yoda rebukes this claim. Yoda states that the shroud of the dark side has fallen on the Jedi's ability to sense the future and that the Clone Wars (Star Wars) has officially begun. Meanwhile, Chancellor Palpatine oversees the launching of massive clone trooper forces as Anakin, with a new mechno-arm, and Padmé hold a secret wedding back on Naboo, with only C-3PO and R2-D2 as witnesses.