Xehanort is the main antagonist of the Dark Seeker Saga of the Kingdom Hearts series. Many years ago, he lived at Destiny Islands. He wanted to live in a larger world. He was met by his heart to time travel and grab 12 versions of himself. He returned to the present and escaped to the Land of Departure. Master Xehanort wass a Keyblade master and colleague of Master Eraqus. He wielded Keyblade Armor and replaced it with a black cloak to accept darkness. Master Xehanort seeks power by accepting darkness. Over the years, he learned about the past including the Keyblade War. As a part of his plan, he takes in an apprentice of his own, a boy named Ventus, with the goal of training him to accept the darkness in his heart and become capable of summoning the X-blade (pronounced Keyblade).
Master Xehanort's plans hits a snag, however, as Ventus proves to be too pure to accept the darkness in his heart. In response, Xehanort takes the drastic step of extracting the darkness from within Ventus and gives it a physical form. He takes this new being, Vanitas, as his new apprentice, and leaves a now amnesiac Ventus with Eraqus. He also manipulates the feelings of Terra, a Keyblade apprentice and Eraqus's own son, in an effort to cultivate the darkness in the young man's heart.
As Xehanort's ultimate plans are about to come to fruition, he is confronted by Terra in the Keyblade Graveyard, but rather than die, he takes possession of Terra's body. In a final confrontation with Terra's friend Aqua, he is defeated. As he falls into an abyss of darkness, Aqua sacrifices herself so that "Terra" isn't swallowed by the void. However, when the being that is part Terra, part Xehanort awakens in Radiant Garden, he has lost his memory, but believes himself to be a man named Xehanort. Upon being found, he is escorted away by Braig.
This "new" Xehanort becomes a student under Ansem the Wise, and while studying the concept of the Heart alongside his teacher, he eventually betrays Ansem and assumes his identity in his thirst for knowledge. In the process, however, he makes numerous sacrifices, and as a result he becomes fragmented into separate Heartless and Nobody incarnations.
His Heartless, named Ansem, possesses Riku's body in order to regain a physical presence and let Riku become the 13th vessel. Although his goal of reaching Kingdom Hearts is realized, Xehanort's Heartless meets his demise by the light of Kingdom Hearts, and Riku is freed from his control.
His Nobody, Xemnas, becomes a charter member and leader of Organization XIII. He seeks to find Xehanort's heart and use the power of Kingdom Hearts by manipulating Sora as a pawn. However, he is ultimately defeated by Sora and Riku.
In the secret ending of Kingdom Hearts Re: Coded, Yen Sid tells Mickey that with the destruction of his Heartless and Nobody, Master Xehanort will form back together. He also goes on to mention that he might appear in 13 forms.
It was revealed that he lead the Organization XIII and let Maleficent gather the princesses of heart. He formed the Organization to turn all the members into Xehanort.