The prologue of Kingdom Hearts II follows the final week of Roxas’ existence in the Virtual Traverse Town. He is confronted by Axel who is under orders to try and bring him back or barring that not working, just destroy Roxas to free Sora’s remaining memories. Either way, Xemnas wishes to have a tool to finish Kingdom Hearts. Roxas – completely unaware of his true existence and only possessing the fake identity DiZ implanted into him – struggles to maintain his grasp on reality as Sora’s restoration nears completion. At one point, his heart actually contacts Kairi’s, triggering her to remember Sora after forgetting him for a year and convincing her to begin her own search for Sora. Namine attempts to interfere by hopefully convincing Roxas to willingly go with the plan by explaining that Nobodies shouldn’t really exist and that by merging with Sora, Roxas wouldn’t be destroyed – he’d become whole again. Roxas however rejects this as he believes himself to be his own person. However, Roxas is ultimately tricked by DiZ and Riku, who has now become so steeped in his own darkness that he only remembers himself as Ansem, into activating the final step and merging with Sora.
Sora awakens along with Donald and Goofy in Twilight Town with no memory of anything beyond the events that occurred at the end of Kingdom Hearts. With no other leads beyond a mysterious entry in their journal to ‘Thank Namine’, they set back on their mission to find Riku and King Mickey. It turns out that King Mickey is right there and offers them aid in dispatching a group of low ranking nobodies – Dusks – before ushering them onto a train with a promise of meeting again soon. Sora and his friends then ride the train to the tower of Master Yen Sid, Mickey’s former master when he was training with a keyblade, where Sora bumps into Pete. Pete is a former resident of Disney Castle before he was banished by King Mickey and joined forces with Maleficent. However, it appears that he is quite behind in the news since he is unaware of Maleficent’s destruction a year ago. Sora, Donald and Goofy scare off Pete and his heartless minions before meeting with Yen Sid who explains that Sora is needed to travel across the worlds once more and protect them from both the heartless and the nobodies. However, no sooner than they leave it is revealed that Maleficent has resurrected herself and is out for revenge.
Over their travels, Sora and his pals learn about Roxas and Organization XIII as well as Maleficent, Pete and their new Heartless army. The journey comes to a head when Hollow Bastion, now renovated into a thriving township by Leon and his gang, discover the laboratory of Ansem – not the one that they defeated a year prior but the real Ansem. It would seem that the Ansem that ruled over Hollow Bastion when it was a thriving city known as Radiant Gardens was Ansem the Wise. The Ansem that Sora fought a year ago was in fact the Heartless of Ansem the Wise’s apprentice – Xehanort or more precisely Xehanort in Terra’s body – who simply stole his mentor’s name. It’s revealed that just as Ansem was Terra-Xehanort’s heartless, he has a Nobody too: Xemnas, leader of Organization XIII. The real Ansem the Wise has been missing for some time. Xemnas however has his own plans in Hollow Bastion where he descends into the depths of the laboratory to a room dubbed The Chamber of Repose where he speaks to an empty suit of armor as if it were a dear friend – Aqua’s armor.
Meanwhile, Axel has been trying to bait Sora into becoming a heartless so that Roxas can be recreated. To drive Sora towards the Darkness, he tries to capture Kairi who escapes with Pluto through the Corridors of Darkness to Twilight Town only for Axel to find her there and bring her back to their Organization’s headquarters.
Sora, Donald and Goofy set out to stop the Organization once and for all. Revisiting world by world until one-by-one they defeat the members of the Organization until finally they are ready to take the battle to Organization XIII’s world – The World That Never Was. They battle through the city and into the floating fortress of the Organization where Sora is finally reunited with Kairi and Riku. They also learn that Roxas and Namine were Sora and Kairi’s nobodies from the times they lost their hearts in Kingdom Hearts. Kairi helps Riku regain his true form. Sora and his friends battle and defeat the remaining members – including Kairi with her very own keyblade – of the Organization until only Xemnas remains. DiZ and King Mickey are trying their luck to destroy Kingdom Hearts by digitizing the hearts that comprise it, and it is revealed that DiZ was actually Ansem the Wise all along. Ansem the Wise tells Mickey to rejoin Sora and the others just before his machine explodes and takes a large chunk of the artificial Kingdom Hearts with it.
The group finally battles Xemnas and defeats the Organization once and for all. Sora, Riku and Kairi are all returned to the Destiny Islands to celebrate. Shortly after however, a bottle with a note bearing the mark of King Mickey arrives on the shore of the island.
At the same time that Riku and Sora are navigating Castle Oblivion, another story is taking place within Organization XIII. This story is about a young man who has the power to wield the keyblade named Roxas, member number 13 of the Organization. Roxas was found by the Organization is a world called Twilight Town that rests on the border between the Light and Darkness, there he was discovered and given his name by the leader of Organization XIII: Xemnas. Xemnas explains to Roxas that he is a Nobody, the physical form left behind when a person becomes a Heartless, and that Roxas in particular is special because he is a Nobody that can wield a keyblade because he is Sora’s Nobody created when Sora became a Heartless to save Kairi in Hollow Bastion.
Roxas is tasked by the Organization to carry out missions to eliminate Heartless with the keyblade which will release the Hearts and cause them to form Kingdom Hearts which the Organization will use to create new hearts and become whole people once more. While out on his missions, Roxas befriends a fellow Organization member named Axel who joins him on daily post-mission ice cream sessions.
As time passes, a handful of members from the Organization are picked to carry out a special mission in Castle Oblivion, with Axel among the numbers. With so many of the Organization going, Roxas is paired up with a mysterious fourteenth member: Xion. The two work together to carry out missions that reveal that Xion too can wield a keyblade & Roxas eventually sees her face which appears as a black-haired incarnation of Kairi. The two begin to share post-mission ice cream just as Roxas had with Axel and they become close friends. Not shortly after that, around the time Sora’s memories are being reconstructed by Namine, Roxas falls into a deep sleep.
When Roxas awakens, he discovers that all the members of the Organization that went to Castle Oblivion save Axel are dead. However, as Sora’s memory reconstruction proceeds under the watch of Namine and a red-clad figure named DiZ who have relocated the sleeping Sora to Twilight Town, Roxas’ own memories of his past existence begin to stir as well. Xion is beginning to have doubts about herself as well after a confrontation with Riku where he proclaims her and her keyblade to be a fake. Riku suggests that if she wants to be real, she should leave the Organization and merge with her true self. Xion turns to the Organization in search of answers and learns that she was created as a clone of Roxas using stolen leaked memories from Sora so that the Organization had a backup in case Sora proved uncooperative or useless to Xemnas’ plans. Xion’s appearance resembling Kairi was in fact due to Sora’s strong memories of Kairi, but now that Namine has begun to weave the memories back together, Xion begins to take on the form of Sora more and more. However, Xion’s appearance also changes from person to person. For instance, Xigbar – the nobody of the former Radiant Gardens guard, Braig – sees Ventus whenever he looks at her. Others just see a hooded figure because they don’t view her as a person. Faced with this truth, Xion flees Organization XIII. The story comes to a head when Roxas and Xion confront each other once more. Xion – now taken on Sora’s appearance completely – has become fixated on becoming a whole and real person, and seeks to consume Roxas to do so. However, Xion’s true plan is to get Roxas to put an end to her existence and free her from her torture but knowing neither he nor Axel would do so willingly, she forces them into a confrontation. Ultimately, she perishes and allows herself to be absorbed into Roxas and thus halts both Sora’s memory restoration by trapping her stolen memories within Roxas and Xemnas’ plans. With Xion absorbed within him, Roxas gains the ability to wield a second keyblade and he sets off on a mission to fulfill Xion’s last wish: free the hearts being used to form Kingdom Hearts. On his way, he confronts Riku who has been sent by DiZ to bring Roxas in. Roxas defeats Riku and forces Riku to unleash the full power of his inner darkness on Roxas, transforming his body once more into the form of Ansem, Seeker of Darkness. Using his full power, Riku manages to defeat Roxas and bring the Nobody to DiZ who digitizes him into a virtual version of Twilight Town so that they can force the trapped memories out of Roxas and back into Sora. The story ends with Roxas talking with a trio of kids – Hayner, Pence, and Olette – as they make plans for the final days of their summer vacation.