Xehanort fused with Terra so he can live longer. When the X-Blade broke, Xehanort was found by Ansem the Wise in Radiant Garden with no memory of his life before that. While studying the heart and darkness within it he began to assume his previous identity with a hunger for knowledge. This led him to ravage his world and sacrifice himself creating the heartless Ansem, and the nobody Xemnas. This also led Braig, Dilan, Ienzo and Even to become nobodies. Ansem wore a cloak and time traveled to where Xehanort was as a teen. Ansem gave Xehanort the power to time travel to find 12 versions of Xehanort from the future. Ansem and Maleficent wanted to find the seven princesses of heart while Xehanort and Xemnas can find 13 vessels of darkness to recreate the X-Blade. He appeared later on in Hollow Bastion (Radiant Garden) after Riku retreated. After Sora reclaimed the keyblade from riku he was told by ansem that in sora's heart was stronger than his thus the keyblade chose sora over riku. Ansem then told Riku that he must open his heart fully to Darkness and let his being become the 13th vessel which made Riku vulnerable to Ansem to possess him and used the hearts of the seven princesses to create a keyblade that can unlock the hearts of others he used it on Maleficent and thus was destroyed. He said that the Heartless were using maleficent of them instead of her using them and commented that it was a fitting end for a fool like her. When Sora found kairi motionless on the ground he told sora that she lost her heart and can't wake up and without it the final keyhole will remain incomplete so long as she sleeps. After ansem's comment Sora then knew that he wasn't really riku and told him to let him go and give him back his heart. Ansem revealed that kairi's heart is inside of sora. He tempted sora to use his keyblade to unlock his own heart to release kairi's and revive her and complete the keyhole since they couln't seal it if it was not complete. sora took ansem's keyblade struck himself with it and slowly faded away and the keyhole was complete and ansem's keyblade was destroyed and the seven princessses heart were freed and returned to them. with Darkness about to erupt from the keyhole Ansem retreated inside the darkness to another world called the end of the world. when sora cameback and sealed the keyhole and preventing hollow bastion from being swallowed by darkness sora went after ansem to stop his evil plans. When Sora arrived to face ansem he tells sora that darkness is the hearts true essence but sora denies that. Ansem then fights sora in the endless abyss were kingdom hearts is. Ansem turns into the world of chaos a giant heartless ship he became attached to when he opened kingdom hearts trying to unleash the great Darkness he was struck by light that ultimately destroyed him disproving what he said about darkness. After Xemnas' death, Xehanort returned. Ansem was picked up by Xehanort from the past to become one of the 13 vessels.