Mace Windu was a General in the Grand Army of the Republic. He is generally accepted as the second highest ranking member of the Jedi Council during the Clone Wars; he is also the third most powerful Jedi Knight during this period, after only Anakin Skywalker (the Chosen One) and Yoda. At the peak of his career, Master Windu must protect the Republic from the threat presented to it by the Sith Lords who are trying to retake control of the galaxy having emerged from hundreds of years of hiding.
As Darth Tyrannus has fallen at the Battle of Coruscant, the armies of the Confederacy have been pushed to the Outer Rim. The Republic is on the verge of winning the Clone Wars. General Windu, in consultation with other ranking members of the Jedi Council, determines that Supreme Chancellor Palpatine (who is actually a crypto-Sith Lord) must give up his emergency powers or even be removed from office.
Anakin Skywalker, who had been sent to spy on Palpatine by the Jedi Council (over Windu's protests), reports to Windu that Palpatine is indeed a Sith Lord and will never give up his power. Windu and three other Jedi Knights posse up and attempt to arrest Palpatine; however, Windu orders Anakin, the Jedi's ace in the hole so to speak, to stay at the Jedi Temple. Windu senses uncertainty within the young Jedi, and feels that he can apprehend Palpatine without the Chosen One's aid.
Windu enters Palpatine's office with three weaker Jedi in tow. He ignites his lightsaber proclaiming that Palpatine is under arrest in the name of the Galactic Senate. Palpatine (AKA Darth Sidious) resists arrest, leaping over his desk. He swiftly runs through Windu's associates including Kit Fisto as if they were C-3PO or mere Javas even. Only Windu remains and perhaps he now regrets not bringing Anakin with him; afterall, Anakin was the Jedi's greatest soldier in the Clone Wars. Arguably, he was born for the moment.
Anyhow, Windu now stands alone, but Windu is not a pushover. He is a master of the Level 7 Vaapad lightsaber battleform, which allows him to match up well against darkside opponents. Although Lord Sidious is probably a little more powerful and would win a fight with Windu 4 out of 5 times, Windu puts the great Sith Lord on his backside with a kick to the face, putting thousands of Sith fanboys in the theaters into such shock that many still insist, despite all evidence to the contrary, that Lord Sidious actually ALLOWED Windu to kick his ass.
Anyhow, just as Windu is about to execute Sidious, the young, arrogant, impudent Skywalker interferes and helps Sidious disable and kill Windu. By striking a Jedi Knight, Anakin makes a very strong move towards Dark Side alignment. He is quickly appointed Sith Lord when Lord Sidious names him Darth Vader, after Anakin agrees to commit to Sith teachings.
Windu for his part will probably go down as one of the greatest Jedi of his age and even of all ages. Had he not been betrayed, he may well have stopped Palpatine from destroying the Galactic Republic and founding the Empire.
However, he contributed to his own downfall by being overly suspicious and conservative in his dealings with the young Skywalker. Had Yoda and Obi-Wan been present and had Windu been more compassionate, Sidious would have had less success in manipulating Anakin. Without Anakin's help, Palpatine would not have gone far and the Republic would have been saved. After Windu's death, all the other Jedi would end up either dying, going into exile, or turning to the Dark Side.
The Jedi would re-emerge nearly 20 years later at the Battle of Endor, when Anakin, at the beckoning of his son Luke, would turn against Sidious, seizing him and throwing off the Death Star. Perhaps Anakin remembered the selfish and wrong decision he made when he turned against Mace? Would it not be something if Anakin was thinking of Mace as he looked down on his son being cooked by Sith lightning?