Following the destruction of Ansem and Xemnas at the hands of Sora and Riku, Xehanort is revived. In response, Yen Sid puts Sora and Riku through a Mark of Mastery exam in order for them to become full-fledged Keyblade Masters and counter the coming return of Master Xehanort. As part of this trial, the two are separated from each other and sent to worlds previously destroyed by the Heartless that have since been restored, though now in a state of "deep sleep" that disconnects them from the other worlds.
These seven worlds are plagued by Dream Eaters — creatures born from darkness that seek out the sleeping worlds' Keyholes. Sora and Riku's given task is to reawaken the sleeping worlds by unlocking the seven Keyholes they find there and then return to the realm of light, recruiting benevolent "Spirit" Dream Eaters to guide them and battle the malevolent "Nightmare" Dream Eaters, after which they will be deemed Keyblade Masters.
During the exam, Sora and Riku cross paths with the resurrected "Ansem" and Xemnas, as well as a younger incarnation of Master Xehanort from an alternate past. The three bring Sora to the World That Never Was, where he learns of Organization XIII's true purpose—to serve as vessels for Master Xehanort to place pieces of his heart inside, thereby transforming them into clones of Xehanort. Sora is forced into a comatose state by the young Xehanort and his heart is swallowed by darkness, though it is protected by Ventus's suit of armor residing within him.
Riku goes to rescue Sora, only to be confronted by the young Xehanort, who unveils a new Organization XIII comprised of the newly revived Master Xehanort and his eleven vessels, whom Xehanort plans to pit against seven Keyblade wielders and recreate the χ-blade. Master Xehanort tries to turn Sora into his last needed vessel, but Sora is rescued by Riku, Mickey, Donald, Goofy, Commander Damintry and Lea—the revived human form of the original Organization's Axel—after which Xehanort and his other vessels retreat.
Sora's body is brought back to Yen Sid's tower, where Riku enters his body and releases Sora's heart from Ventus' armor, now possessed by a Nightmare. After Sora reawakens, only Riku is declared a Keyblade Master by Yen Sid, and Lea reveals himself to have become a Keyblade wielder. Undaunted by his failure, Sora embarks on a new journey by himself to train. While Sora travels to Traverse Town in order to meet all his Dream Eater friends, Ventus is shown still being at Castle Oblivion, but suddenly starts smiling a bit. In a post-credits scene, Yen Sid is planning to gather seven Keyblade wielders to combat the new Organization and prevent Xehanort from bringing about another Keyblade War. To this end, Yen Sid has Damintry bring Kairi to him so she can be trained to wield the Keyblade she received from Riku in Kingdom Hearts II.
- Logan Lerman as Sora
- Lucas Till as Riku
- Kevin Spacey as Master Xehanort
- Tobey Maguire as Young Xehanort
- Greg Vaughan as Xemnas
- Bradley Cooper as Ansem/Xehanort
- Michael Shannon as Commander Damintry
- Saoirse Ronan as Lori
- Paul Butcher as Marco
- Jim Sturgess as Braig
- Matt Damon as Dilan
- Shane West as Even
- Kellan Lutz as Aeleus
- Sean Faris as Ienzo
- Alexander Skarsgård as Isa
- Channing Tatum as Lea
- Kodi Smit-McPhee as Neku Sakuraba
- Spencer Breslin as Joshua
- Kevin Zegers as Beat
- Anna Kendrick as Shiki
- AnnaSophia Robb as Rhyme
- Josh Hutcherson as Roxas/Ventus "Ven"
- Selena Gomez as Xion
- Liam Hemsworth as Terra
- Emma Bell as Aqua
- Alex Pettyfer as Vanitas
- Dakota Fanning as Namine
- Chloe Grace Moretz as Kairi
- Ethan Hawke as Ansem the Wise