"Five Magics" was inspired by the 1980 fantasy novel "Master of the Five Magics" by Lyndon Hardy, although the five magics listed in the song's lyrics a bit differ to those in the book. The five magics in the book are listed as Alchemy, Sorcery, Wizardry, Thaumaturgy and Magic. The song also refers to a Magic ritual and some storyline described in the book.
This is the only Megadeth song that's truly fantasy-oriented. .