It has been three years since the Clone Wars began at Geonosis. General Grievous has abducted Chancellor Palpatine at Coruscant and Anakin Skywalker and Obi-Wan Kenobi are off to rescue him.
Inside Grievous' shuttle, they encountered Count Dooku, who engaged in a lightsaber duel with the two Jedi Knights. Anakin killed Count Dooku at the request of Palpatine. As they tried to escape, they were turned in to General Grievous. The Jedi fended off his Magnaguards and protected the Chancellor. However, General Grievous went inside an escape pod as his shuttle is about to land at Coruscant.
As the shuttle landed, Anakin reunited with Padme. She told him that she is expecting a child, to his joy. Anakin had nightmares of his wife dying.
Obi-Wan Kenobi arrived at Utapau to stop General Grievous and end the Clone Wars. Grievous was killed by a blaster that Kenobi used near a ledge.
Anakin talked with Chancellor Palpatine and learned about 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 realized that Chancellor Palpatine is secretly Darth Sidious. He told the news to Mace Windu.
Mace Windu and other Jedi Knights convinced Chancellor Palpatine to resign his status but Palpatine used his lightsaber and killed Mace Windu's fellow Jedi. Mace Windu cornered Palpatine by a window, which made Anakin worried. Palpatine used his Force lightning to stun Windu at the expense of making his skin wrinkly. Anakin killed Mace Windu and was chosen as Palpatine's apprentice. He was given a new name: Darth Vader.
Palpatine authorized Order 66 to all of the Clone Troopers to wipe out the existence of the Jedi. Obi-Wan and Yoda survived the purge and hundreds of Jedi died at both the hands of Anakin and the Republic.
Anakin killed off the remaining forces of the Separatists and shut down the droid army, ending the Clone Wars. Yoda encountered Palpatine inside the Galactic Senate and failed. He decided to exile himself to Dagobah. Obi-Wan learned that Anakin is at Mustafar.
Obi-Wan and Anakin argued about how the Galactic Republic became an Empire. Padme intervened, but Anakin made her choke. At the fiery pools of lava, Anakin had a duel with Obi-Wan. He tried to reach Obi-Wan but his legs were cut off from Obi-Wan's lightsaber. Obi-Wan expressed his sadness that the Chosen One would be a Sith. Anakin was burned alive from the lava and was put on life support by Emperor Palpatine in a mechanical suit.
Padme gave birth to twins, Luke and Leia. She died shortly after she gave birth to her children telling Obi-Wan that there is still good in Anakin. Obi-Wan decided to give Leia to Bail Organa and send Luke to Tatooine, where his father's family is so that they won't be hunted down by Darth Vader.