The search for an actor to play the character ended when Samuel L. Jackson expressed his desire to be in the prequel films. Lucas then offered him the role which Jackson accepted and thus signed on but with certain stipulations on his character's portrayal. Aware that the prequel trilogy's climax would eventually call for Windu's death, one of the conditions was that his character die in a spectacular fashion, rather than being killed off ingloriously "like some punk".[4]

According to an interview on the Late Show with David Letterman on May 13, 2005, the character's purple lightsaber was a personal request from Jackson to Lucas as a quid pro quo for appearing in the films, as well as a way of making the character unique and easily distinguishable.[4]

Windu makes his first appearance in Star Wars Episode I: The Phantom Menace as the Master of the Jedi High Council.[1] He is present when Jedi Master Qui-Gon Jinn brings Anakin Skywalker before the Council, saying that the boy is the Chosen One of Jedi prophecy. Concerned with the boy's age, Windu and the other Council members decline. After the Trade Federation is defeated, and Darth Maul is killed in a duel with Obi-Wan Kenobi, Windu realizes that the Sith has returned due to Darth Maul's attack, and he and the Council reluctantly allows Obi-Wan to train Anakin in Qui-Gon's stead, though Windu continues to distrust Anakin.[5]

In Star Wars Episode II: Attack of the Clones, set ten years after the invasion of Naboo, Mace Windu realizes that Senator Padme Amidala's assassination attempt was done by a Sith lord. Having learned of Obi-Wan Kenobi's whereabouts on Geonosis, Windu arrives to save Obi-Wan, Padawan Anakin Skywalker, and Padme from being executed in the stadium. In the ensuing battle, he kills the bounty hunter Jango Fett. This results in the Battle of Geonosis, which serves as the opening salvo of the Clone Wars. Before Count Dooku's droid army can kill the Jedi, Yoda arrives with the new Clone army for the Galactic Republic to rescue them.[6]

In Star Wars Episode III: Revenge of the Sith, Mace Windu has fought in the Clone Wars for three years and during which time has come to distrust Supreme Chancellor Palpatine. The Jedi Council is troubled by Palpatine's power and fears he will not relinquish it when the Clone Wars end. Their suspicions only grow when the Senate grants Palpatine a vote on the Jedi Council by appointing Anakin as his personal representative. While they granted him a seat, the Council refuses to grant Jedi Knight Anakin Skywalker the rank of Jedi Master, and orders him to spy on Palpatine. After Jedi Master Obi-Wan Kenobi kills General Grievous, Jedi Knight Anakin Skywalker informs Windu of Palpatine's treachery. Acting swiftly on this terrifying revelation, Windu and fellow Jedi Masters Kit Fisto, Agen Kolar, and Saesee Tiin attempt to arrest Palpatine. However, Palpatine accuses Windu of treason before killing Mace's companions in a matter of mere seconds and battling the Jedi Master in a lightsaber duel. Windu deflects a burst of Force lightning back into Palpatine's face with his lightsaber before Anakin arrives. When Windu makes it clear that he intends to execute the Dark Lord, Anakin objects but Windu replies that Palpatine has control of both the Senate and the courts, and so to keep him alive would be far too dangerous. As Windu is about to kill him, Anakin intervenes and severs Windu's lightsaber hand, allowing Palpatine to strike him with a blast of Force lightning and hurl him out of the window to his death.[7][8]

Mace Windu is a supporting character in Genndy Tartakovsky's Star Wars: Clone Wars micro-series, which is set between Attack of the Clones and Revenge of the Sith. The character's likeness in the series is based on that in The Phantom Menace and Attack of the Clones. In the first chapters, he defends the grasslands planet Dantooine against a large hovering "fortress", and over the course, he loses his lightsaber, forcing him to instead use a lethal form of unarmed combat powered by the Force. In final chapters, he and fellow Jedi Master Yoda help defend the planet Coruscant from an attack by General Grievous. In the midst of the battle, he realizes that the attack is a ruse to distract the Jedi from Grievous's true objective: to kidnap Palpatine. Despite being too late to save the Supreme Chancellor, the Jedi Master uses the Force to crush Grievous's chest, inflicting upon the cyborg general a wheezing, asthmatic cough, setting the stage for Revenge of the Sith.

Mace is the central character of Matthew Stover's novel Shatterpoint, in which he is called to his home planet of Haruun Kal to defeat his former apprentice Depa Billaba who has turned to the dark side of the Force. The novel establishes that Windu has the unique talent of seeing "shatterpoints", or faultlines in the Force that could affect the destinies of certain individuals and indeed the galaxy itself. Mace's "shatterpoint" ability also enables him to see people's weaknesses, allowing him to exploit their flaws and defeat them. It also explains that Windu is the creator and sole master of a style of lightsaber combat called Vaapad (Form VII), in which the user skirts dangerously close to the dark side — without giving into it — by actually enjoying the fight and the thrill of victory. All others who attempted to master the form either gave in to the dark side or were unable to properly master the technique. Stover also referenced these abilities in his Revenge of the Sith novelization. It was said that without his unique style only Yoda and Dooku could match him. However, with the use of Vaapad he was the greatest swordsman of his time, able to defeat Darth Sidious in lightsaber combat which even Yoda could not achieve. He was also able to overwhelm Dooku in lightsaber combat during the battle of Boz Pity which took place between Attack of the Clones and Revenge of the Sith.