The Ancient Library glitch is a glitch in Final Fantasy V. It only happens in the Merged World after the player has gone through Ghido's Cave and gone through the events at the Library of the Ancients. After all of the storyline is done, if the player casts Teleport before exiting the library, the party appears outside of Ghido's Cave instead of the library. This allows the player to travel around the world on Boco, since Exdeath removed the mountain blocking the path towards Crescent near Tycoon Castle. This allows the player to skip the Pyramid of Moore for the time being, letting them get the more powerful equipment and magic at Mirage Village, as well as being able to do various other things, such as the Phoenix Tower. The player will still need to complete the Pyramid to get the airship to go to the Interdimensional Rift or access any areas that are only accessible via the submarine.
By visiting the Mirage Village, the player can re-obtain the black chocobo, and using it, can travel to Castle of Bal for the wind drake, which is required to complete the Island Shrine without the airship. The player can then visit the Sealed Castle and acquire three of the legendary weapons. The Excalibur, Holy Lance and Sage Staff are all good choices, as they carry a Holy effect, which is useful against the numerous undead opponents in the Pyramid of Moore.
The glitch also allows the player one last chance to grab anything from Lix, Walse, and Istory if they did not grab everything from there in Bartz's World. Another, rather humorous part of this glitch involves being able to get Lenna back on the team if they go to the Island Shrine before going to the Pyramid of Moore. While this will not yet restore her to the party, her sprite will be present during the scene where the party uses the Sealed Tome to open the way. After completing the shrine, the way to the Fork Tower will be opened. At this point, the player can visit the Fork Tower, and the game will ask the player to decide which way to send each of the characters, including Lenna. At this point, Lenna is restored to the party and will remain following completion of the events in the tower. The party can then proceed to the Pyramid of Moore and return to the Forest of Moore. This results in having Lenna fighting to rescue herself. However, after the battle, she will still be KOed regardless if she was KOed or not in the fight. Additionally, if the player were to visit the Sealed Castle, the chancellor will comment on Lenna's safety regardless of whether or not she has been returned to the party.