Riku was the True KeyBlade Master, but turned his Heart to Darkness in KH1.
In Kingdom Hearts: Chain of Memories after Sora entered Castle Oblivion, Riku found himself in nothingness. There he was spoke to by a mysterious voice. The voice give him the choice of staying in the comforting "sleep" or awaking. Riku chooses the latter, finding himself in the basement of Castle Oblivion. There, he confronts his memories of the darkness and the Ansem that still lingers in his heart, even after his defeat by Sora. Rikus presence is detected by members of Organization XIII, who are using the castle for their purposes. Those members decide to use Riku to oppose Sora, who is being used by a Marluxia and Larxene, other members in the Organization, to overthrow the others.
Riku meets Vexen, one of the basement Organization XIII. Vexen battles Riku and uses the data to create the Riku Replica, who is later used to battle Sora. Later, Riku meets Lexaeus, another member of the basement faction. Lexaeus tells Riku to open himself to the darkness and fights him when he refuses to. Defeated, Lexaeus explodes into darkness, to overwhelm Riku. Kingdom Hearts Re:Chain of Memories alters the scene by having Ansem possess Riku and defeat Lexaeus. In the darkness, Ansem attempts to possess Riku, but is interrupted by Mickey, and Riku returns to Castle Oblivion.
After Marluxia is defeated by Sora, Zexion, the remaining member of the basement faction, tries to destroy Riku by psychological warfare, convincing Riku that it was he who destroyed Destiny Islands and transforming himself into Sora to exacerbate Riku's guilt. Zexion drowns Riku in light, but a vision of Kairi convinces Riku to accept his dual nature of light and darkness. With resolve, Riku chases away Zexion.
Riku meets Ansem again, but Riku is able to see that the spectre is not Ansem. The illusion reveals himself to be DiZ, a mysterious stranger that Mickey feels he remembers. DiZ implores Riku to meet Naminé, who is attending a sleeping Sora to restore his memories and tells Riku she can seal the darkness and Ansem in his heart. Riku, who realizes Naminé was the vision of Kairi he saw before, refuses the offer. He will face Ansem. DiZ gives him the means to, and Riku defeats Ansem. Riku knows that Ansem is not fully gone, and leaves Castle Oblivion with Mickey as a companion.
After defeating Xehanort's Heartless, Riku and Mickey walked down a path leading away from Castle Oblivion, wearing Organization XIII's coats. They meet DiZ at a crossroad, and he asks Riku a question. "Will you take the road to light — or the road to darkness?" Riku chooses the middle road. DiZ asks, "You mean the twilit road to nightfall?", to which Riku replies, "No… The road to dawn."
Riku managed to return to his original form upon the destruction of a machine that was intended to control hearts. Riku, who had long ago strengthened his heart to a degree much higher than it was originally, was once again a Keyblade master. Thus he could wield his Way To Dawn KeyBlade. (a fusion of his Soul Eater, Light, and Darkness, possibly.)
Thanks to Wilkpedia for most of the information! :toungesmile: