Joyboy was the king of the D clan that lived in a certain kingdom that existed 900 years ago.
This kingdom was far more technologically advanced, but their existence was unknown to the rest of the world. They created the "weapon" Uranus to keep their existence a secret, which possess the power to erase the memories of everyone in the world, with exception of the D clan.
At some point, a person who lived in the kingdom named Imu stole Uranus, and used its power to manipulate the minds of the leaders of the 20 greatest nations and form the World Government.
With this influence, Imu also got in their hands Pluton and Poseidon. Pluton was used to destroy Joyboy's kingdom, and Poseidon to move the islands around the world, and form a continent that split the sea, known as Red Line.
The ruins of the Ancient Kingdom are at the end of the Grand Line, deep down into the ocean where no Log Pose can reach.
In this final island, Joyboy left a Poneglyph with a plan to undo all of Imu's actions: using Pluton to destroy the portion of the Red Line under Mary Geoise, and weakening the link between the islands; Poseidon to move the islands back to their position; and Uranus to erase the memories of everyone. Thus uniting all people and the ocean back into one piece.
Lastly, Pluton must also be used to destroy the walls that separate Wano from the rest of the ocean, meaning Wano has its own one piece.