Though there are many soldiers throwing spears and bombs to deter trespassers, the front gate lies open. Go through the front gate, and into the castle through the front door.
Exit through the east door, then to up the stairs in this room to the upper level. Exit the castle through the south door.
Outside, head west and you see an evil spectre summoned by the dark wizard, blocking your path to the castle's upper reaches where Zelda is being held. Use the mighty Blade of Evil's Bane to cut down the barrier, and go through.
Pass through the entryway to find two golden Mace Knights. If you are at full health, the Master Sword will throw a swirling beam of righteous energy. Use this beam to hit the mace knights from afar. They take many hits before they fall, so be patient. If you are not at full health, you must defeat each one as you did the mace knight that guarded Zelda's cell so long ago.
Once the knights are defeated, go through the now-open door to a room in which two sword-bearing knights charge you. Kill them and a chest appears containing a small key. Use it to go through the locked door and up the stairs beyond.
In this dark chamber an eye keese waits on the statue and a knight with a sword attacks. Kill them, and exit west.
In this maze, go all the way north, then all the way west, and then south. At the first opening, go east, and then south. When the path splits, take the second path south (far-left). From there, south, then west, careful to avoid the soldier. Once the soldier is dead, head north to find a chest containing a small key. Go south and back east into the maze. Head north, then take the southern path to your right and go down. At the split, head south, and ignore the first eastern path and take the second, heading south and east again to get to the east wall of the room. Go through the locked door here.
Kill the knights that attack and go up the stairs in the north wall.
Still dark, a regular soldier and a bow and arrow soldier attack. Kill them and continue through the western door.
This dark maze is filled with holes; go with caution. Take the center path leading west and kill some soldiers on the way. From there, go north, continuing north when the path splits, kill the soldier and go east through the door.
Be careful of the soldiers in this dark room; two bear a bow and arrows. One of the soldiers holds a key; collect it and go through the locked north door.
Finally; some light! Kill the Spear Knights and eye keese. If you touch the tile on the wall, Sahasrahla warns you that even the Master Sword cannot physically harm the wizard; you must turn his own magic against him somehow. Exit west.
Kill the spear-bearing soldiers and exit south, to where two more spear soldiers lurk, and two eye keese. Kill these enemies, then collect the key that the center soldier drops. Go through the east door.
A golden Mace Knight, a Spear Knight, and a regular knight attack. Carefully kill the Spear and regular knights below, then work on the Mace Knight. Either that, or simply run upstairs.
Once upstairs, push the left-hand statue further left to get out of the enclosure, then kill the soldiers and exit west.
Carefully traverse the narrow pathway, killing soldiers on the way, to reach a set of stairs leading straight up.
The music becomes ominous; the wizard must be near! Head through the north door, and there is the wizard, and Zelda lying upon a vile altar, unconscious. The wizard uses his wicked powers to immobilize you while he makes Zelda vanish before your eyes! He says the seal of the seven wise men is now broken, and the tribe of evil holds the Power of Gold. He then spirits away to the next room.
Now that you are free of his spell, run around the altar to the back of the room, and cut down the center curtain. Go through the doorway that was hidden behind it.
-- Agahnim --
This is it; this is your chance to take down the malevolent wizard once and for all! After threatening you with utter destruction, the wizard turns into a black ball and floats to another part of the room. The wizard has three attacks: a round, flashing energy orb; six small, blue orbs in a circle; and (when standing at the top of the room) lightning. Just as Sahasrahla said, the Master Sword cannot harm the wizard physically; if you try, you will get electrocuted! To harm the wizard, you must swing the Master Sword when he hurls an energy orb at you. The ball will bounce off your sword and fly back to the wizard, harming him! The six blue orbs will explode when you hit them, so be careful not to get hit by them when you cut apart the circle with your sword; they cannot be used to harm the wizard. If the wizard floats to the top of the room, stand to one side, because he may shoot lightning straight down at you. You can tell if he is about to shoot lightning by going to one side of him. If he turns to face you, he is not about to shoot lightning. If he still faces the bottom of the room no matter which side of him you're on, he is about to shoot lightning, so stay away. Continue hitting the energy orbs back at Agahnim until he speaks.
He will acknowledge you as a true Hero, but will draw you into the Dark World! The world will change, just as it did when you stepped on the glowing tile on Death Mountain, and you will find yourself atop a pyramid!