Obi-Wan and I have been given a very important mission by the Council. The Separatist leaders are hiding on Mustafar; we are going on a mission there, to end this war, once and for all. I will return safely, my love; I promise.
—Anakin Skywalker, to Padmé Naberrie Skywalker
In 16 ArS, the Dark Lord of the Sith, Darth Sidious, better known as Palpatine, the Supreme Chancellor of the Galactic Republic, was revealed to have initiated the Clone Wars in order to seize control of the Republic, reform it into an empire, and destroy the Jedi Order. Palpatine, despite having his true identity exposed, and his master plan foiled, was able to escape the galactic capital, and flee known space. As a result, the Jedi High Council was forced to take control of the Galactic Senate until a new Chancellor could be elected.
Even though the primary threat was over, the Jedi Council determined that the last of the Separatist leaders had to be rounded up, so that the war could be brought to an official end. In order to accomplish this, the Council sent Jedi Master Obi-Wan Kenobi, and his former padawan, Jedi Knight Anakin Skywalker, both regarded as the best duo in the Order, on a mission, codenamed Operation: Endgame, to capture the members of the Separatist Council, in order to bring them back to Coruscant, so that they could be questioned for their involvement with the Sith, and to be tried for their crimes against the Republic.
With the Delta-8 Jedi Starfighter, which housed two crew members, Kenobi and Skywalker traveled to the volcanic planet of Mustafar, where the Separatists' hidden base, the Klegger Corp Mining Facility, was, and sabotaged essential systems, in order to make the Separatist leaders' capture much easier, rather than try to take on the facility's entire defense network.
When the bases' defenses were completely rendered useless by the Jedi, they called in the 501st Legion, the most elite group of clone troopers in the Grand Army of the Republic, along with the 7th Sky Corps, and all of it's subordinate battalions, companies, and squads, to finish the job.
When the clone troopers arrived, their massive numbers easily overwhelmed the small amount of droid and Neimoidian forces stationed at the facility, allowing Kenobi and Skywalker to capture the members of the Separatist Council.
After the Separatist leaders were put into custody, a deactivation signal was sent to all Separatist droid units, of which a very large amount of the CIS forces were made up of, and 99% of the Separatists planets and forts were forced to surrender to Republic forces. With this, the Clone Wars—one of the largest galactic conflicts of all time—were finally put to an end.
Last days of the CIS
During the Confederacy of Independent Systems' attack on the galactic capital, Coruscant, the Separatist Head of State, Count Dooku, was killed by the Jedi Knight, Anakin Skywalker, which greatly impressed Palpatine, who was, in actuality, Dooku's Sith master, Darth Sidious, who saw this as a sign of the young Jedi's power. Sidious had planed to turn Skywalker to the dark side for a long time, and, after thirteen years, his influence on Skywalker was beginning to come to fruitition. The Sith Lord knew that to mold Skywalker into the perfect Sith apprentice, he would have to be opportunistic, and take advantage of the conflict within the so-called "Chosen One" of the Jedi Order.
Following Dooku's death, General Grievous, the Supreme Commander of the Droid Armies, assumed direct control over the Separatist Council, which, at the time, was based on the sinkhole planet of Utapau.
Grievous's first action under Sidious' direction was the Council's transfer from Utapau to Mustafar, as Sidious knew of the impending offensive on Utapau led by Jedi High General Obi-Wan Kenobi. Once on the volcanic planet, the Council inhabited the Klegger Corp Mining Facility, which was a clandestine location—one that was perfect for hiding in.
However, when Kenobi assaulted the Separatists on Utapau, he not only completed his objective—the elimination of Grievous—but discovered the existance of the Mustafar Mining Facility, which was where the entire Separatist Council could be found.
Master Windu! I must talk to you."
"Skywalker—we've just received word that Obi-Wan has destroyed General Grievous. We're on our way to make sure the Chancellor returns his emergency powers back to the Senate."
"He won't give up those powers. I've just learned a terrible truth; Chancellor Palpatine is a Sith Lord."
"A Sith Lord?!"
"Yes—the one we've been looking for."
"How do you know this?"
"He knows the ways of the Force; he's a master of the dark side."
"Are you sure?"
"Then our worst fears have been realized… we must move quickly if the Jedi Order is to survive this.
—Anakin Skywalker and Mace Windu discuss the revelation of Darth Sidious' identity
Shortly before the mission's inception, Jedi Knight Anakin Skywalker uncovered a shocking revalation about Darth Sidious' identity—he was none other than Chancellor Palpatine, leader of the Galactic Senate, and Skywalker's mentor.
Shortly thereafter, Skywalker reported this discovery to Jedi Master Mace Windu, who, along with fellow masters Kit Fisto, Saesee Tiin, and Agen Kolar, went to the Chancellor's office in the Republic Executive Building to arrrest him, thus relieving him of power. Meanwhile, Jedi liaisons were sent to the Senate Building to contact the Republic Security Council and the Galactic Senate itself to inform both parties of the situation.
When the Jedi confronted Palpatine, a lightsaber duel ensued, and all four Jedi were no match—they perished at the hands of the dark lord and his master bladework. However, shortly after Mace Windu's death, Skywalker, Obi-Wan Kenobi, and Jedi Grand Master Yoda made their way into the Chancellor's Suite. There, Sidious was forced to flee; he was simply out-matched against three of the most powerful Jedi in the galaxy, and Skywalker, whom Sidious had sought to turn to the dark side, had utterly rejected it.
After the flight of Sidious, and the revelation of both his identity and of Vice Chair Mas Amedda's involvement with the Sith Lord, the Senate was placed under the temporary control of the Jedi Council, who sought to capture the members of the Separatist Council—the leaders of the CIS—which would end the war, so that elections could be held for a new Supreme Chancellor.
Finding the Separatist leadership was easier done than said, as Kenobi, shortly after the Battle of Utapau, had discovered information of the Separatist Council's location: the planet of Mustafar.
This is it, Anakin. Are you ready?"
"Don't worry, Master; I have faith in the Council's decision, your abilities… and myself. I know that I'll be able to do what must be done."
"Good; you seem to be growing wiser all the time."
"That's the idea.
—Obi-Wan Kenobi and Anakin Skywalker, after the mission briefing
Shortly after the Jedi Council took control of the Senate, an emergency meeting—between the now-eight members of the council—was called into session by Grand Master Yoda in order to prioritize what needed to be done to properly usher in the election of a new Chancellor. The most important topic of the meeting, obviously, was ending the war that had cost billions of sentient lives. After Obi-Wan Kenobi presented the information he had gathered on Utapau on the whereabouts of the Separatist Council, it didn't take long for a plan to be formed.
The plan was constructed thusly—Skywalker and Kenobi would take the Delta-8 Jedi Starfighter, a craft that could hold two passengers, and travel to Mustafar, where the Separatist leaders were located. After arriving planet-side, the pair would infiltrate the base, evading both the droid and Neimoidian forces that guarded the base, working to disable the defense systems and sensor array, which would allow the 501st Legion and the 7th Sky Corps to storm the Klegger Corp Mining Facility, and, along, with Kenobi and Skywalker, defeat the forces guarding the Council, then promptly capture the members of the Legislative branch of the CIS.
Before departing, Skywalker and Kenobi made a stop at the Senate Apartment Complex, where Senator Padmé Naberrie Skywalker, Anakin's wife, lived. Skywalker told her of his confrontation with Sidious, and all that had happened afterwards, to which she expressed guilt over the fact that she had, unknowingly, aided Sidious in his rise to power, but her husband reassured her that it wasn't her fault, and everything would set right again. They shared a brief, but intense kiss before Skywalker re-joined Kenobi in their waiting starfighter, and departed for Mustafar.
Arrival on Mustafar
Leaving Coruscant, Kenobi and Skywalker engaged the hyperdrive on their Delta 8, and reached Mustafar in a very short period of time, dropping out of hyperspace out of Separatist sensor range. In spite of the obstacle, the pair managed to land on the planet's surface, largely in part due to a special device that made ships invisible to sensors.
Since both Jedi landed a sizable distance from the Mining Facility, they both had to embark on a fairly long trek—bypassing other parts of the Separatist mining operation—until they reached the a part of the land that was directly bellow the facility. Left with no other option, the duo climbed up the slanted surface of hard rock before arriving upon the main catwalk.
Skywalker and Kenobi then split up, Kenobi heading for the sensor array, and Skywalker heading for the main hub of the facility's automated defense system. In using the element of stealth, both Jedi were able to avoid detection entirely, only one of them encountering a problem—Kenobi was forced to destroy a sqaud of battle droids that blocked his position, and would not leave the area. Shortly afterwards, Kenobi sabotaged the sensor array, and signaled for the Republic fleet under the command of Kenobi and Skywalker, who were waiting in a nearby system, to come to Mustafar, and ready themselves for battle.
Rendezvousing near the facility's main control room, both Jedi informed the Open Circle Fleet of their success, and gave orders for the attack to begin.
Confronting the Separatist Council
One can do some very interesting things with a saber, you know—I'd be obliged to show them all to you if you'll do your best not to faint.
—Anakin Skywalker, to the members of the Separatist Council
Kenobi's deactivation of the sensors had not gone unnoticed by the droids—three squads were sent to investigate the sensor array. When they found it disabled, they reported their findings, which were received with anxiety by the Separatist Council.
At that moment, Skywalker and Kenobi burst into the control room, earning visible shock from all members of the Council. The duo quickly annihilated every battle droid present, and vanquished all of the units of the Neimoidian Gunnery Battalion, the elite protectors of the Council.
Meanwhile, the 501st Legion began their assault of the facility through the main hangars, while the 7th Sky Corps was inserted onto the collector arms. Both the 501st and the 7th had little trouble in wiping out the complex's defenders, and then securing the facility in order to confiscate all Separatist military equipment and probe the databanks for vital information.
The Separatist Council members were all incarcerated, and placed in holding cells on the Venator-class Star Destroyer Negotiator for transport to Coruscant, where they would be tried for treason against the Republic.
Before departing, Skywalker and Kenobi sent a shut down signal to all of the Separatist Droid Army, thus ending any military engagements between the Confederacy of Independent Systems and the Galactic Republic.
After the war was brought to an end by Kenobi and Skywalker, the members of the Separatist Council were tried, and the sentences ranged from thirty years in prison to one-hundred years in prison. Additionally, Senator Bail Organa of Alderaan was elected Supreme Chancellor of the Republic, and Padmé Naberrie Skywalker of Naboo was elected Vice Chair.
Under Organa and Naberrie Skywalker, new legislation, in particular the Balance of Power Act, was passed in order to prevent the Chancellor or the Senate from gaining too much power—this was done to reduce the chances of the Republic being controlled by either a dominant faction in the Senate, or, conversely, the Chancellor.