I want to play devil's advocate now. From the beginning:
Palpatine grew up on a backrocket planet in the mid-rim, seeing rampant corruption and a government that frequently failed to live up to it's intended goals. He was trained by a Sith named Darth Plagueis, one of the enlightened Sith who believed that the Force was both Life and Death, who wanted to instill in his Acolyte the need for balance in the Force. Palpatine thought that this meant he needed to bring down the Jedi, when in reality Plagueis was trying to teach him to find inner peace.
When it came time for Palpatine to become a Sith Lord, he betrayed his master and murdered him in his sleep. Now bearing the title Darth Sidious, he arranged a way for the corruption of the Trade Federation to be brought to light.
Unfortunately, the corruption in the senate completely ignored the massive abuses the Trade Federation perpetrated against Naboo, and he saw no choice but to step in himself and try to enact justice. When he assumed the Chancellery, he assumed he could begin hacking away at the corruption immediately. When that failed, he established the Confederacy through his new acolyte, Darth Tyrannus, who was at one point already a Jedi Master. Tyrannus, already disillusioned with the Jedi, took Palpatine's extremes in the Sith Teachings even further.
Unfortunately, he began to double deal behind Palpatine's back, as dark Sith are wont to do, and Darth Sidious was no longer in control of the CIS as he had intended. When Tyrannus ordered his capture, Palpatine realized that he could never trust a fully powerful Sith Lord as his equal or underling. He ordered Anakin to kill Tyrannus to cover for his mistakes, and to help free him from the Jedi's destructive and inhibiting dogma.
Unfortunately, as Anakin came to understand more about the truth of the Force, he was still fighting the Jedi dogma, and when he realized that Palpatine was trained as a Sith, he assumed that Palpatine was evil, which he learned was wrong when the Jedi tried to assume power in the galaxy by assassinating the duly elected Chancellor. When Anakin witnessed this first hand, he broke the shackles of his Imperialist "Masters" and began to correct his mistakes in understanding. Palpatine, in a moment of anger, ordered the complete destruction of the Jedi, without stopping to think about the consequences. He enacted "Order 66," a safeguard meant to stop any Jedi who went rogue from further damaging the Republic. (The proof of this lies in the fact that he had to call each squad leader individually, rather than just broadcasting a mass "Order 66" message to all units with Jedi assigned.) While Anakin was charged with taking over the Jedi Temple, he was also angered and betrayed that those he looked on as his only family had done this horrible thing. In his anger, he simply started fighting his way through the Jedi remnants, until when he got to the chamber where the Jedi Younglings were hiding, he was so worked up with anger that he couldn't control himself. He may even have worked himself into such a rage that he doesn't remember slaughtering the younglings.
Palpatine was appalled by his actions, having at first intended to train the younglings in the correct views of the force, but he eventually came to understand that at least most of them would have been hard to convert, having lived with Jedi dogma for as long as they can remember.
When he learned of the Separatist Leader's hideout, he dispatched his acolyte Darth Vader to capture them. Again, misunderstanding his orders, Vader "Captured" the leaders with his lightsaber.
Palpatine was doing his best to correct his past mistakes, and reorganized the Republic into the First Galactic Empire with only his most trusted allies found in positions of power. The ones he could trust.
Yoda attacked the Emperor in his suite, attempting to complete the botched assassination that his peers had failed. Luckily the Emperor's Sith training allowed him to hold off the Jedi assassin, who at every turn prevented Palpatine from escaping when he attempted to flee.
At the same time, Darth Vader's former master joined him at Mustafar, attempting to turn him against the Emperor and back to the Jedi way, so that they could overthrow the Emperor and restore "freedom" to the galaxy. Vader saw through his ploys, especially the manipulation of his own wife against him, and engaged in a furious duel with his former master.
Vader was so damaged psychologically by this fight that he could not bring himself to fully immerse in the Force and even restrained himself from hurting his master as much as possible. When Obi-wan cut him down, and left him to die in that lava pit, Darth Vader called out to Palpatine, who heard his call and immediately came to his rescue.
Seeing the true beliefs of the Jedi at this time, both knew that the galaxy would never be safe until this menace was wiped away. They immediately began looking for all of the information they could find about the Confederacy and it's military spending, as there were massive amounts of missing funds and warships. This eventually lead to the discovery of a black project called the "Death Star." The construction was fully funded, and nearing completion when it was found, 16 years after the fall of the CIS. The Emperor put his friend Grand Moff Wilhuff Tarkin in charge of the station.
The rebel alliance, intending to build it's own Death Star, stole the plans for the station, and transmitted them to Princess Leia of Alderaan, who was going to smuggle them into her home system, where fund-raising could begin for this massive project. Vader intercepted her and took her to the fully operational Death Star, intending to show her the consequences of that decision.
Tarkin, eager to try out his new Doctrine, "rule through fear of force, rather than force itself," ordered the destruction of Alderaan due to it's intention to build weapons of mass destruction.
When the rebel criminals broke the Princess out of prison, the Empire got lucky enough track the Millenium Falcon to it's home base. Having no fleet within strike distance, the Grand Moff decided to pilot the Death Star into the system and draw the rebels out in an engagement they couldn't win. Unfortunately, the rebels had time to analyze the plans and found a weakness. They destroyed the Death Star with one shot, killing over 1 Million people, including innocent bar tenders and reporters who were onboard for the decomissioning ceremony.
The Emperor, concerned that other planets could get their hands on the plans, immediately ordered the construction of a second Death Star, to be used to engage any other Death Star. This one was fitted with an even more powerful laser that could be fired at different power-levels, and was capable of targeting ships down to cruiser size for self defense.
Meanwhile, Darth Vader began the furious search for the leader of the rebels, Luke Skywalker, his son. When he found his son's friends stranded on Bespin's Cloud City, he let word filter out that he had them, and waited for Luke to come to him. Luke charged into battle, hopelessly outmatched by the man who he so desperately wanted to destroy. When Vader revealed his true heritage, and explained the truth of the Force, Luke chose to jump to safety rather than face the truth.
The Emperor, fearing the rise of a new order of Jedi, trained by Luke Skywalker, sought safety aboard this new defense platform, until such time as it was made operational. He feared a massive raid by the rebels that would result in his capture like had happened at the end of the previous war.
When the rebels, lead by Skywalker himself attacked the second Death Star, he ordered the fleet to be engaged by the Death Star. As rebel ships began to fall, Skywalker entered the throne room and engaged Darth Vader. Darth Vader was no match for the younger Skywalker, whom he tried to once again to enlighten. Skywalker refused to listen, and struck down Vader, then turned on the Emperor, who was unable to defend himself at his advanced age.
When the Death Star was destroyed, Luke began traveling the galaxy, spreading the story that Vader had realized the wrongness of his actions and destroyed the Emperor himself to atone for his actions in an effort to build goodwill feelings towards the rebellion which had, overnight, destabilized an entire galaxy.