After Hyrule was hit with terrible misfortunes (drought, etc), the king of Hyrule offered a reward to anyone who could put an end to the disaster. A mysterious wizard name Agahnim ended all of Hyrules misfortunes with an unknown magic. He was deemed a hero and was appointed the King's chief advisor, priest, and heir to the Seven Sages. Once given this power Agahnim brain washed all of Hyrules soldiers, got rid of the king, and sent six of the seven sages to the Dark World.
Soon after Link rescues Zelda, the last descendant, and hides her in a sanctuary, but Agahnim's soldiers find her. She is taken to the top of her tower in Hyrule Castle and Agahnim sends her to the Dark World and with the seal of the Seven Sages broken the Dark World will soon overrun the Light World. Link fights Agahnim but is sent to the Dark World before having a chance to finish him. After fighting Agahnim a second time and defeating him Link soon learns that Agahnim is an alter-ego of Ganon.