Will you take the road to light- or the road to darkness?
~ DiZ
Neither. I'm taking the middle road.
~ Riku
Once we step through, we might not be able to come back. We may never see our parents again. There’s no turning back. But this may be our only chance. We can’t let fear stop us! I’m not afraid of the darkness!
~ before he is engulfed in darkness
Once we go through, there's no turning back. It's victory...or oblivion. So, Sora...are you ready? Do you remember before? We stood facing each other on opposite sides of that door. Now we stand side-by-side. Let's go home together this time.
~ after the door appears.
If the world is made of light and darkness... We'll be the darkness
~ to Sora at the Dark Margin.

Riku is the deuteragonist in the Kingdom Hearts series. He is Sora's best friend, but also his main rival.

Kingdom Hearts Birth by Sleep

Terra meets a young Sora and Riku on Destiny Islands, and chooses the latter as his successor to wield the Keyblade. They later meet Aqua, who finds that the friendship between them is similar to the one between her, Terra and Ventus. Sometime after that, Sora and Riku are resting on the beach. When they are about to head home, Riku sees Sora shed a tear, and thinks that someone from another world (Ventus) is sad and recommends that Sora try to reach out to him.

Kingdom Hearts

Riku is one of the main inhabitants of Destiny Islands. Maleficent gifted him and took him in with Darkness. Ansem, Seeker of Darkness took control and Sora eventually freed him and defeated Ansem. To seal the Door to Darkness he stayed with King Mickey.

Chain of Memories

Riku traveled throughout the basement area of Castle Oblivion. During Marluxia's attempted coup against Organization XIII, while Sora fought against Marluxia's traitor faction, Riku fought against Zexion's group of loyalists. He would also battle the Riku Replica a number of times. He later meets The King and DiZ. He finally defeated Ansem and began his quest to control his Darkness and help Sora awaken.

Kingdom Hearts II

Riku in his Ansem form keeps track of Roxas, Sora, and the Nobodies in the Simulated Twilight Town. He meets the Emperor and battles Sora in the Land of Dragons. He becomes his old form and works with Sora, Donald, and Goofy to defeat Xemnas and return home with his friends.

358/2 Days

Riku teams up with DiZ to help Sora awaken. He defeats Xion and calls her Keyblade a sham. He has Xion decide what to do. Eventually Diz is fed up with the delays, and has Riku capture Roxas and sends Roxas to the Simulated Twilight Town and he waits for Sora to awaken.

Kingdom Hearts coded

When Jiminy's Journal is digitized, a data version of Riku is created to act as a vessel for the memories in it. In the ending cutscene, Sora and the real Riku are on Destiny Islands talking about how small their homeworld is, and then about the Door to Light. Kairi then arrives and gives them a letter sent to them by Mickey, and they read it together.

Blank Points

After reading the letter, Riku asks him if he's decided whether to go and search for the people connected to him. He replies that he has, which makes Riku smile.

Kingdom Hearts 3D: Dream Drop Distance

Sora and Riku are made by Yen Sid to undertake the Mark of Mastery exam to prepare them for the impending return of Master Xehanort. For their test, they are sent to the Sleeping Worlds, worlds formerly consumed by Darkness that haven't yet awakened after their restoration, which they are supposed to wake up. On his journey, Riku encounters Ansem, Seeker of Darkness and a mysterious young man with ties to Master Xehanort several times, and they try to make him succumb to the darkness.

Once all the Sleeping Keyholes are sealed, Sora becomes trapped in a state of sleep in The World That Never Was. Riku comes to save him, and finds him comatose due to his heart having been damaged by Xemnas and the mysterious young man, who is revealed to be a younger version of Xehanort from another timeline. Riku defeats the Anti Black Coat in Sora's nightmare, continues to progress through the castle, and eventually encounters Ansem, who tells him that he is a Dream Eater. Riku defeats him and then finds Sora in Where Nothing Gathers, about to be made a vessel for Xehanort's heart.

Riku is able to save Sora with the help of Lea, but he still remains comatose and is brought by Riku to Yen Sid's Tower, where he enter Sora's body so he can repair his shattered heart. Inside, he has to fight and the Armored Ventus Nightmare, which is Sora trapped inside Ventus's Nightmare-possessed Keyblade Armor. After defeating it, Riku goes deeper into Sora's heart and enters a memory of Destiny Islands, where he meets illusions of Roxas, Xion and Ventus, who each ask him a question. After he answers all three of them, he comes across a bottle and meets another illusion, this time of Ansem the Wise. The illusion tells him that he hid hid his research data inside Sora before fell asleep, and that defeating the Nightmare and answering the other illusions' questions has awakened Sora. He then returns to the real world, reunites with everyone, and is named a Keyblade Master by Yen Sid. He and the others are shocked when Lea tells them that he plans to become a Keyblade Master too and summons his own Keyblade by accident.

Yen Sid then gives Riku his first duty as a Keyblade Master; to bring Kairi to him so she can receive training in using her Keyblade so that she can join in the battle against the New Organization XIII.

Kingdom Hearts Birth By Sleep 0.2 -A fragmentary passage-

After Riku brings Kairi to Yen Sid's Tower, he listens as Yen Sid tells them of his plan for protecting the other six Princesses of Heart and for saving Terra, Ventus and Aqua. Mickey reveals that he and Aqua were together when the Door to Darkness was closed, but she stayed in the Realm of Darkness to stop Riku from being attacked by a swarm of Heartless. Riku asks him why he kept it a secret until now, but Yen Sid reveals that he forbade Mickey from telling telling anyone because he was afraid that Sora would make a reckless attempt at rescuing Aqua, but that both he and Riku are now strong enough to do so successfully. When Kairi is apprehensive about her training with Lea (because of he's the human form of Axel, who kidnapped her before), Riku and Mickey assure her of his trustworthiness, telling her that he saved Sora before. Yen Sid then gives Riku and Mickey new clothes made by Flora, Fauna and Merryweather, which are meant to darkness in the dark realm, and set out on their way to save Aqua.