It has been three years since the Clone Wars began at Geonosis. General Grievous has abducted Chancellor Palpatine on Coruscant and Anakin Skywalker and Obi-Wan Kenobi are off to rescue him.
Inside Grievous' shuttle, Kenobi and Skywalker encounter Count Dooku, who engages in a lightsaber duel with the two Jedi Knights. Anakin kills Count Dooku, at the request of Palpatine. As they try to escape, they are turned in to General Grievous. The Jedi fend off Grievous and crash-land on Coruscant, but Grievous escapes in an escape shuttle.
As the shuttle lands, Anakin reunites with Padmé. She tells him that she is expecting a child, to his joy. Anakin has nightmares of his wife dying.
Obi-Wan Kenobi arrives at Utapau to stop General Grievous and end the Clone Wars. After an intense battle, Grievous is killed by Obi-Wan using a blaster near a ledge.
Anakin speaks with Chancellor Palpatine and learns the Tragedy of Darth Plagueis. Darth Plagueis was able to take control of the Force and use the dark side to prevent death. However, he died at the hands of his apprentice. Anakin realizes that Chancellor Palpatine is secretly Darth Sidious. He brings the news to Mace Windu.
As Mace Windu and other Jedi corner Palpatine to arrest him, Palpatine kills all of the Jedi present except Windu and Anakin. Mace Windu corners Palpatine by a window, worrying Anakin, who believes Palpatine alone knows the secret of Darth Plagueis. Palpatine uses his Force lightning to stun Windu, at the cost of making his own skin appear wrinkled and decrepit. Anakin kills Mace Windu to save Palpatine and becomes Palpatine's apprentice, and is given a new Sith name: Darth Vader.
Palpatine authorizes Order 66, which orders the Clone Troopers to execute their Jedi Generals. Vader leads an attack on the Jedi Temple, murdering everyone inside, including younglings. Obi-Wan and Yoda survive the purge and discover that Anakin has turned to the dark side. Yoda sends Obi-Wan to confront Vader as he challenges Palpatine.
Vader is sent to Mustafar by Palpatine to execute the Separatist council, who then sends out the order to shut down all remaining droid armies, ending the Clone Wars. Yoda confronts Palpatine, and they duel in the Senate Chamber. Palpatine overpowers Yoda, who exiles himself to Dagobah for his failure.
Obi-Wan tells Padmé that Anakin has turned to the dark side, to her shock and disbelief. Padmé follows Anakin to Mustafar, but is trailed by Obi-Wan. On Mustafar, Obi-Wan confronts Vader, who proclaims that he is more powerful than Palpatine and will become the new Emperor. Padmé refuses Vader's offer to rule alongside him, and Vader force chokes her to near death, blaming Obi-Wan for turning her against him. Vader and Obi-Wan duel, but Obi-Wan is victorious, and causes Vader to fall into a pool of lava. Maimed and burned to near death, Vader is rescued by Palpatine, who reconstructs his body and places him into a mechanical suit to keep him alive.
Padmé gives birth to twins, but dies in childbirth. Obi-Wan and Yoda decide to separate her children, Luke and Leia, sending Leia to Alderaan and Luke to Tatooine. Leia is given to Bail Organa, royal Senator from Alderaan, and Luke is given to Anakin's stepbrother Owen and his wife Beru. Obi-Wan stays on Tatooine to watch over Luke as Vader and Palpatine begin construction on the Death Star. Beru and Owen look to the twin suns of Tatooine with hope for the future.