This part will take you up to the final boss fight.
Link appears at the bottom of a grand set of stairs that leads to the entrance of the throne room of Hyrule Castle. Go up the stairs and step through the entrance, where you'll enter a cutscene where Link notices the lifeless body of Princess Zelda being held in stasis within the Triforce portion of the broken Goddesses statue. Sitting on the throne below the statue is Ganondorf, who greets them by welcoming them to "his castle". He tells Midna that her people have long amused him with their pathetic attempt to defy the gods with their magic, yet they served him well by letting him feed on their anguish. He shows her the power that he wields through the Triforce of Power that would make him a suitable ruler of both worlds. Midna promises she will do everything in her power to deny him such control. Ganondorf challenges Midna and her friend to deny him, then transforms himself into Twilight bits so he could enter Zelda's body. Midna tries to prevent Ganondorf from gaining such control, but he passes through her, then reanimates Zelda to blast Midna away. He also traps Link within a Twilight barrier and appears to him to take up Zelda's sword and to float high in the air, ready to make his challengers feel his wrath.
During Ganondorf's attack as the possessed Zelda, he will float high in the air and attack Link in one of three ways: by charging up a magical energy bolt to fling at him, by making a triangular field of energy appear below Link's feet to hurt him, or by swooping at him using Zelda's sword. When he charges up an energy bolt, use your sword to strike it back toward him. He will then deflect the bolt to strike it back toward Link, causing you to play a game of energy bolt tennis until it strikes either you or him. Make sure you have enough room between yourself and the possessed Zelda so you'll be able to strike the energy bolt back at Ganondorf. When he causes the triangular field to appear, quickly use a Back Slice roll to get out before it singes you. When he does a swooping attack, dodge out of his way and let him pass. When Zelda's body is struck enough times, it will spark as Ganondorf loses control of her, and then Midna will arise and use the power of the Fused Shadow to purge Ganondorf's spirit completely from Zelda's body.
Ganon the beast
However, Ganondorf's spirit now reforms as he changes into a hideous feral beast that will charge around the room, plowing through whatever is in his way, and disappearing through portals only to reappear through one in another rampaging attack. Here we're going to need to use Link's wolf form to deal with Ganon the beast. While standing in the middle of the throne room, watch the portals as they appear and disappear and wait for one to turn blue, indicating that this will be the one that Ganon will emerge from. While standing your ground, wait for him to approach and use the A button for Midna to grab him and flip him over to his side so you can jump on him and attack his chest wound. He will arise and then disappear through a portal. Repeat the same strategy of waiting for him to emerge from a portal and then standing still and grabbing him when he emerges. After a few successful hits, Ganon will change his attack pattern to include dropping down on top of us and just simply running around the room before charging at us. Quickly move out of his way when he drops down and prepare for his charge toward you, to grab him, fling him aside, and attack his wound. After several successful strikes, Ganon will howl in anguish before he collapses.
Chasing Ganondorf on horseback
As Link and Midna watch Ganondorf's beastly form smolder, Midna will notice that the power of light now is being transferred out of her body and into Zelda's, bringing her back to life. Midna is at a loss for what to say, but Princess Zelda tells her to say nothing, for when she was with Midna, she knew about her companion's suffering. Then they see the beastly form of Ganondorf turn into the flaming face Zant had seen earlier. Midna takes the Fused Shadow parts and transforms herself one more time into the tentacled creature in order to deal with Ganondorf. Link tries to stop Midna from doing this, but Midna transports him and Zelda out into Hyrule Field before she forms a giant spear to stab into the flaming face before her. Link and Zelda watch from a distance as they see Hyrule Castle explode, and out in the field Ganondorf emerges on a black stallion, holding Midna's helmet in his hand and crushing it underfoot, indicating that she died. He also causes phantom horse riders to appear as they charge directly toward Link and Zelda. The princess prays to the light spirits to give her the power to banish evil from the world, and just before she and Link are overrun by Ganondorf and his phantom riders, they emerge in a bright glowing place where the light spirits answer her prayers by giving her (and us) the very item we need to deal with Ganondorf -- Light Arrows. Zelda humbly bows before Link, asking him to grant her the last of his power, and soon they both appear on horseback, riding on Epona.
The object of this portion of the battle is to get as close as we can to Ganondorf so we can fire Light Arrows at him to stun him, then Link can strike him with the sword. Again try to keep at least two spurs on hand so that you won't have to wait for a recharge. Making this part challenging is that Ganondorf will summon phantom riders to appear in order to knock us off our horse, delaying us so that he can come after us and strike us when we least expect it. Watch for how the phantom riders will appear and try to ride through the gaps so that you won't be knocked off. If you do get knocked off, quickly get back on Epona and try to get back up to speed, watching for where Ganondorf may come to attack you. After striking him several times, Ganondorf will be thrown off his horse as it collapses.
Final Boss: Ganondorf
As Link and Zelda pull to a stop, Ganondorf arises and draws out his own blade, which was the same sword the Ancient Sages used to try killing him, saying that he intends to use it to blot out the light forever. As Link approaches Ganondorf, a Twilight barrier surrounds the two combatants, preventing them from leaving and Zelda from entering and interfering. Zelda realizes at this point that the outcome of the battle -- and the fate of Hyrule and the world -- rests solely on the hero chosen by the gods.
Throughout the battle, Ganondorf will do a variety of sword attacks that can be easily blocked or avoided. He will on occasion get you with a massive sword slash that will cause you and him to lock swords with each other. The A button prompt will appear onscreen when that happens, indicating that you better press the A button repeatedly so you can break out of the lock and push Ganondorf away momentarily, leaving him vulnerable to some frontal attacks. Mostly you'll want to rely on the Back Slice roll to the left so you can get behind Ganondorf and attack him there. When he goes down for the count, target him and use the Ending Blow to finish him. As the Master Sword pierces through Ganondorf's body, he rises once more rather weakly, saying that it doesn't end here, and that the history of light and darkness will be written in blood. Then Ganondorf sees the ghost of Zant his underling snapping his own neck, and with his last breath he realizes that his time of godhood has ended.
Success!!! You have just beaten the final boss of the game.
After Ganondorf dies, Link and Zelda see the four light spirits convene together, and a female figure resembling Midna emerges in the distance. Link goes over to the female figure, and then sees that it is Midna taking on her true Twili form, which is that of a beautiful young woman around Zelda's age. Midna notices Link's reaction to her appearance and responds, "Am I so beautiful that you've no words left?" As Link smiles, realizing that Midna is alive again, the closing credits will play, showing various events taking place such as the children of Ordon Village departing from Kakariko Village, the Gorons happily engaging in sumo wrestling, Telma thinking about something (or somebody) while looking at her cat in her bar, Queen Rutela's spirit watching over her son Prince Ralis at Zora's Domain, and Uli cradling her newborn child while sitting by the waterside watching the children return.
After the credits have rolled, Link, Zelda, and Midna appear at the Mirror Chamber at Arbiter's Grounds, with Midna ready to depart to the Twilight Realm to take her place again as its ruler. Midna says that light and shadow cannot mix with each other, but Zelda realizes that light and shadow cannot exist without each other, and she also realizes the purpose that the goddesses created the Mirror of Twilight for. Midna recognizes from Zelda's heart that she would be suitable as the leader of Hyrule. She has something else to say to Link, but words fail her at that point and instead simply says, "See you later". Midna then sheds a tear and gently flings it into the Mirror of Twilight, causing it to crack as she ascends the stairs into the portal that will take her back into the Twilight Realm. Link realizes from this that he will never see Midna again, and after she departs, the Mirror of Twilight shatters completely, closing the portal between the two worlds for good.
As more of the closing credits roll, the Master Sword is again laid to rest in the Sacred Grove, Hyrule Castle is completely restored, and Ilia sees Link riding into Ordon Village on Epona, happy to see him again.
And so the story ends.