The Empire's origins are explained in Star Wars Episode II: Attack of the Clones and Star Wars Episode III: Revenge of the Sith, where it replaces the Galactic Republic in the midst of a crisis orchestrated by Palpatine, then the Republic's Supreme Chancellor. In a scene towards the end of the film, Palpatine appoints himself Emperor in the presence of the Galactic Senate, afterwards the Imperial Senate. By the time of A New Hope, the Empire has transformed into a merciless totalitarian regime, still struggling with the Rebel Alliance.
When the extent of the Separatist threat becomes clear in Episode II, the Old Republic Senate, the legislature of the Republic, grants Palpatine emergency powers to deal with the crisis. This conflict allows Palpatine to remain in office long after his term as Chancellor officially expires. Palpatine promises to return his powers to the Senate once peace and order is restored to the galaxy. He takes advantage of the conflict to greatly increase the office's power until by Episode III, he is practically a dictator.
The Jedi begin to distrust the Chancellor's motives, fearing he has come under the influence of a Sith Lord named Darth Sidious. Their concerns are shared by several Senators, who suspect Palpatine may not return his powers to the Senate as promised. Among them are two who had long supported Palpatine, Padmé Amidala and Bail Organa. Indeed, Palpatine has sent out governors to oversee the various worlds of the Republic, buttressed by detachments of clones. The film eventually reveals that Palpatine and Sidious are one and the same, and that he has been manipulating the Republic and the Separatists against each other.
When the Jedi Knight Anakin Skywalker discovers Palpatine's true identity, the Jedi try and fail to arrest him. The Sith Lord tries to dispatch Jedi Master Mace Windu by blasting him with Force lightning. However, Windu turns it back onto its source with his lightsaber, horribly scarring Palpatine's face. Anakin intervenes on Palpatine's behalf by cutting off Windu's hand, allowing Palpatine to send Windu plunging to his death with a renewed blast of lightning. Palpatine then converts Anakin to the dark side of the Force, making him his Sith apprentice, Darth Vader.
Palpatine declares the Jedi to be traitors and enemies of the Republic. Secure in his power and position, Palpatine reorganizes the Republic into the Galactic Empire, with himself as Emperor for life. Shortly prior to this declaration, Palpatine issues Order 66, a secret order he implanted in the clones to kill their Jedi commanders. In a matter of hours, nearly all Jedi are wiped out across the galaxy.
The Senate enthusiastically supports Palpatine's "safe and secure society", although a few, like Padmé and Bail, realize that the "freedom" enshrined by the Republic is in serious jeopardy. A deleted scene in the film establishes that the two are among the main founders of the Rebel Alliance.
Two remaining Jedi, Obi-Wan Kenobi and Yoda, attempt to stop the Sith menace that is sweeping the galaxy. Yoda confronts Palpatine in an epic duel, and Obi-Wan duels his former apprentice. Even though Obi-Wan succeeds at defeating Vader, Yoda is unable to defeat the new Emperor.
Palpatine dissolves the Senate in A New Hope because the Empire discovers several seats in the Senate are actually taken by members of the Rebellion. However, the Senate had been a powerless advisory body for some time; real power is in the hands of sector governors ("moffs") and priority sector Grand Moffs such as Grand Moff Tarkin. Eventually, the regional governors are granted direct control over their territories after Palpatine disbands the Imperial Senate.
In A New Hope, Tarkin explains the Empire's philosophy as "rule through fear of force rather than force itself". The instrument of this power is the military, which includes the Imperial Stormtroopers, Scout Troopers, Sandtroopers, SCUBA Troopers, Snowtroopers, and a large fleet of intimidating war vehicles such as the Imperial Navy's Star Destroyers and the Imperial Army's All Terrain Armoured Transports (AT-ATs or imperial walkers) which are intended in part to spread fear as well as destroy the enemy. This policy reaches its zenith with the construction of the Death Star, a moon-sized superweapon. Plans for the Death Star first appear in Attack of the Clones; Construction begins at the end of Revenge of the Sith and would last approximately 20 years.
The Imperial Army is a part of the Empire's armed forces. It operates massive ground combat vehicles and maintains garrisons across the galaxy. It also cooperates with other branches of the Empire in a variety of operations. The Imperial Army consists of at least several armies, battalions, divisions and a considerable number of legions, of which some are stationed on Coruscant and others are scattered in the Imperial Navy and planetary garrisons across the galaxy.
At its peak, the Imperial Navy fielded at least tens of thousands of warships and fulfilled the Emperor's will throughout the galaxy. After defeat at the Battle of Endor, the Galactic Empire split up into warring factions and the Imperial Starfleet splintered along with it. While much of the remnants of the Imperial Navy were later reunited under impressive Imperial commanders, the military organization covered in this article ceased to exist shortly after the death of the Emperor.
Specific responsibilities of the Imperial Navy included defending Imperial citizens from space-based threats such as pirates, smugglers and rebel contingents, enforcing Imperial Will, and overseeing commerce through customs and blockade operations. The Imperial Navy also performs orbital bombardments, transports major ground force deployments and supports them with space and aerial support.
The Death Star, a moon-sized space station (whose construction begins at the end of Episode III) with sufficient firepower to destroy a planet, is designed to be the supreme weapon of the Empire's power. Tarkin, the station's commander, demonstrates that power in A New Hope, when he destroys Alderaan merely as a show of force. In the film's climactic scene, however, the station is assaulted by a small force of Rebel starfighters; the battle ends with the Death Star's destruction at the hands of Luke Skywalker. The victory is the Rebel Alliance's first major success against the Empire.
The Empire is permanently defeated in Star Wars Episode VI: Return of the Jedi. In the film's climactic battle, the Rebellion destroys the second Death Star and a great portion of the Imperial Navy's highest ranking officers. During this battle, Vader is redeemed, and as Anakin, throws his evil master to his death, but is himself mortally wounded by Force lightning intended for his son, Luke.
In the Jedi Prince series, a group of imposters calling themselves the prophets of the dark side install a three-eyed mutant named Trioculus as Emperor by claiming that he is Palpatine's son. By the end of the series, Palpatine's true son, Triclops, helps the Rebels defeat this new enemy.
In the Jedi Academy Trilogy, an Imperial admiral named Daala commandeers the remainder of the Imperial Navy and mounts a ferocious assault on the New Republic. She nearly succeeds in taking over the galaxy, but is foiled by New Republic pilots Wedge Antilles and Lando Calrissian in the final entry, Champions of the Force.
Star Wars: Legacy, set 140 years after Return of the Jedi, explains that, during a civil war, the New Galactic Empire declares war on the Galactic Alliance. This conflict begins the Sith-Imperial War, which after three years leads to the eventual defeat of the Galactic Alliance and the Galactic Empire asserting its domination over the galaxy once again. Another split occurs as Darth Krayt usurps the throne and forces Emperor Roan Fel to take refuge in the fortress planet of Bastion.