Super Sentai Legends

Super Sentai Legends is a term used to refer to members of the first 34 Super Sentai teams that sacrificed their powers to destroy the Zangyack invasion during the Great Legend War.

Origins
When the Space Empire Zangyack attacked the Earth, they were countered by the first 34 Super Sentai teams in what was known as the Great Legend War. Countless ships bombarded cities while hundreds of Gormin troops led by their Zgormin commanders fought against the Sentai army. The Rangers, led by Tsuyoshi Kaijou aka AkaRanger, put up a valiant fight but Kaijou soon noticed the fleet moving towards them. He gathered all the Rangers together and gave them the order to use their power to wipe out the first invasion's armada. Thus, the Earth's future was saved. But the Super Sentai warriors lost their powers, and became mere legends. The powers of the Rangers were harnessed in Ranger Keys which were spread throughout the universe.

AkaRed
Though the powers of the Sentai teams were gone, AkaRed, a hero that embodied that Red Warrior spirit who first appeared five years ago, returned. He became a space pirate and formed the Red Pirate Gang, with his teammates, Marvelous and Basco ta Jolokia, along with his robotic parrot, Navi. They searched the universe in the Gokai Galleon to find the Ranger Keys, which contained the powers of the 34 Sentai teams, which were dispersed all over the universe. The trio knew that with them, they could find the Greatest Treasure in the Universe.

AkaRed encountered Marvelous when he discovered the AkaRanger Key after fighting Gormin. Marvelous refused to give it to him and fought AkaRed, who swiftly defeated Marvelous. Marvelous revealed to AkaRed that he wished to find the Greatest Treasure in the Universe. AkaRed shown Marvelous his ship, the GokaiGalleon, telling him that he would never find the treasure if he gave up. They went on to find many Ranger Keys, such as the BoukenRed Key. They later met Basco ta Jolokia who joined them.

Since Basco didn't appear in the flashback in episode 21, it is presumed that he joined after Marvelous.

They eventually managed to find all the Ranger Keys (or so Basco and Marvelous), but Basco betrayed AkaRed and Marvelous, he conspired with Zangyack which attacked the ship, wanting the treasure all for himself. AkaRed saved Marvelous from the Zangyack forces and gave him the chest containing the Ranger Keys, telling him to find the Greatest Treasure in the Universe. AkaRed was last seen charging into dozens of Gormin Sailors.

Gokaigers
Marvelous, along with Navi, who gave him hints on how to find the treasure, encountered four other people and later founded the Kaizoku Sentai Gokaiger. The Gokaigers searched for the treasure when Navi's hints led them to Earth, where it confirmed that it was the location of the Greatest Treasure in the Universe. After making themselves known to Zangyack and saving human lives, they encounter Kai Ozu (MagiRed) of the Mahou Sentai Magiranger, who revealed to them that they would only be able to find the Greatest Treasure in the Universe if they unlocked the greater power of the Ranger Keys. This resulted in the Gokaigers being led to Sentai legends via Navi's hints, upon proving themselves to them, the legend or legends would give them the greater power of their teams.

Mahou Sentai Magiranger
When Kaizoku Sentai Gokaiger landed on earth their guide Navi told them to find,"A man dressed in black". This man turned out to be none other than Kai, calling himself "A magician who forgotten his magic" and challenged GokaiRed and GokaiGreen. With assistance from Heavenly Saint Flagel, Kai helped GokaiGreen realize the "true power of the Magirangers", which turned out to be courage. He revealed to Marvelous that he could only gain the Greatest Treasure in the Universe once he unlocked the greater power of the Ranger Keys. It's also illuded that he might've given GokaiOh the power to transform into Magi GokaiOh.

Juken Sentai Gekiranger
Navi told the Gokaigers to look for the "tiger's child." After the battle with Master Pachacamac XIII, Doc and Ahim meet with the traveling teacher while he was teaching his students how to use the Jyuken Fists. It wasn't until after they trained with him that they learned he was the "tiger's child" they were looking for with one of Jan's students refering to him as GekiRed. He watched the giant monster battle and witnesses the Gokaiger utilizing the Gekirangers full power. Master Shafu then appears and asks if there was anymore he could have taught them. Jan tells him that they'll be fine as they understand that wanting to becoming stronger is a sign of being stronger already. He then goes off and says he has to train more so he can catch up with them.