The 501st Legion, also referred to as the 501st Battalion, the 501st clone battalion, and later nicknamed «Vader’s Fist,» was an elite stormtrooper legion under the command of the Dark Lord of the Sith Darth Vader during the Imperial Era. The legion predated the Galactic Empire, its origins dating back to the era of the Clone Wars when the 501st was an elite military division of clone troopers in the Grand Army of the Republic. Under the leadership of Jedi General Anakin Skywalker, Jedi Commander Ahsoka Tano, and Clone Commander CT-7567 «Rex,» the 501st fought against the Separatist Droid Army of the Confederacy of Independent Systems. Throughout the conflict, the soldiers of the 501st were known for their courage, unconventional tactics, and loyalty to the Galactic Republic.
The 501st saw action on multiple battlefronts across the galaxy, becoming part of several historic engagements such as the Battle of Christophsis, the Second Battle of Geonosis, and the Battle of Umbara. During the campaign on Umbara, Skywalker was recalled to the Republic capital of Coruscant, leaving General Pong Krell to assume command of the legion in the interim. Unbeknownst to the clones who served him, Krell turned to the dark side of the Force, and having foreseen the rise of a New Order, he worked in secret to undermine the Republic. The 501st mutinied against Krell when his betrayal was revealed. They sustained multiple casualties while confronting their commanding officer, but ultimately succeeded in capturing Krell, who was executed while in military custody.
An incident within the 501st nearly exposed a Sith conspiracy against the Jedi Order. During the Battle of Ringo Vinda, CT-5385 «Tup» betrayed and killed General Tiplar, resulting in an investigation that revealed a hidden behavioral modification biochip within the brain of every clone trooper. An Advanced Recon Commando, CT-5555 «Fives,» investigated further into the matter, and learned that the chips were designed to force the clones to kill their Jedi allies. Alarmed by this discovery, he revealed his findings to Skywalker and Rex, but was unable to convince either of them before his death by the clone shock troopers of the Coruscant Guard.
In the last days of the Clone Wars, Skywalker divided the 501st by creating the 332nd Division and dispatching it, including the 332nd Company, to Mandalore. Led by Commander Rex and former Commander Tano, the division defeated the Mandalorian super commandos and captured their leader, the former Sith apprentice Maul. During the journey to Coruscant, however, the Great Jedi Purge commenced when Supreme Chancellor Sheev Palpatine—the Sith Lord Darth Sidious—declared that Order 66 was in effect, turning the clone troopers against their Jedi officers. Although the 501st failed to terminate Tano, the other half of the legion stormed the Jedi Temple and killed its inhabitants, including Padawans and Jedi younglings, under the leadership of the newly christened Sith Lord Darth Vader. Rex deserted the 501st after defending Tano against his own troops, including CT-5597 «Jesse,» all of whom died attempting to carry out Order 66. On Coruscant, the 501st was defeated by Jedi Masters Yoda and Obi-Wan Kenobi who infiltrated the Temple while Sidious declared himself Emperor of the Galactic Empire.