Once you finish talking to Legate Quentin Cipius, your objective is to meet with Legate Rikke. She is outside near the gate of Whiterun.
Upon exiting Dragonsreach, the severity of the assault will become blatantly obvious. Flaming catapult rocks are raining down upon the Wind and Plains districts of Whiterun , and its populace is in a state of pandemonium, running about the city seeking shelter. City Guards are heading towards the city gates to aid the defence, and the sky has turned a sickly orange from the smoking buildings.
Proceed to the staging area just outside the main gates. Legate Rikke will be giving a short motivational speech to the combined forces of Whiterun Guards and the new reinforcements of Imperial Soldiers. Once the speech is done, your new objective will be to defend the wooden barricades from the invading Stormcloak soldiers. If you enter the city at all during the battle, terrified citizens will be seen fleeing from the taverns and shops to their own homes, where they will lock the doors to prevent anyone from entering. All shop owners will lock their doors, including the taverns; stall owners will flee, as well.
Defend the barricades by killing the Stormcloak soldiers trying to get in. If you fail to defend the barricades, you will have to fall back and defend the drawbridge instead. Failing to defend the drawbridge has little consequences, as the quest is impossible to fail unless you die. There will be a percentage count of how many Stormcloak soldiers are left. Once that count reaches 0%, your new objective will be to meet with Jarl Balgruuf the Greater to hear a short victory speech.
Be careful of using spells and arrows. NPCs who can often be found such as Louis Letrush or the stable owners can get caught in the crossfire and earn you a bounty.
Your horse can easily be killed if it's waiting by the stables.
Summoning Odahviing or Durhneviir will help immensely, as either can quickly slaughter large numbers of enemy soldiers, and Durhneviir will also summon Mistmen, Bonemen and Wrathmen.
This is a good time to loot Steel Arrows, as almost every Stormcloak Soldier will have 10+ arrows on them.
Heimskr's house is sealed after the battle with debris and is missing most of the roof. This means a quest from the Thieves Guild from Vex cannot be completed.
Hadvar takes part in the battle, clad in a new set of Imperial Heavy armour. He will greet you during the speech, and argue that he killed more enemy soldiers during the victory speech.
Despite the defense being complete and the Stormcloaks being driven back, the city may continue to be bombarded by fireballs. They do no damage, and the citizens seem unaware of them. There is no apparent fix for this, however it can be avoided. There are certain things that seem to cause this glitch:
Looting the bodies of ANY fallen soldiers for anything, both Stormcloak and Imperial. It seems that having any looted item in the player's inventory makes the game "memorize" that the battle is still going on, even though it ended. It is best not to loot anything at all, before, during, or after the battle. If the player wishes to loot the Stormcloak Officer Armor, there is another way to get it. (Note: Could not replicate bug via looting in over a dozen attempts on 4 different saves on 360 & PC, more likely the cause is #2)
Entering Whiterun right after the battle. It seems that the game doesn't "refresh" the current state of Whiterun, causing it to be a warzone forever. Note: After talking to Jarl Balgruuf, it is advised to travel back to Solitude or anyplace away from Whiterun and the surrounding area for that matter, and then travel back to Whiterun. Everything should be back to normal as the game has been given time to "refresh" the state of Whiterun. *Not only this but otherwise you may lose your stolen goods, traveling to Solitude and speaking with Tullius before fast traveling back corrected this (PS3)
If siding with the Imperials be sure to talk to Jarl Balgruuf before traveling to Solitude and reporting to General Tullius. If you don't talk to Jarl Balgruuf, the objective to report back to him will permanently remain in your questlog and Jarl Balgruuf with still have a quest marker over him.
When you leave the Castle, as you make your way to the main gates, sometimes almost all of the Citizens of Whiterun will group just outside the Guardhouse. However, when you approach them, they will run to their house or tavern and then proceed to lock the doors for the remaining duration of the siege.
Sometimes, Legate Rikke will talk, then stop for no known purpose, and the Stormcloaks will not advance. A fix for this is to attack her until she becomes hostile and then sheate your weapon. The Stormcloaks should charge now.
Completing this quest can possibly make The Shill Job impossible to complete on console versions of the game, as Heimskr's house is inaccessible afterwards.
PC Occasionally a glitch at the completion of this quest. Once the battle is over and Jarl Balgruuf gives his speech, you should get the quest Reunification of Skyrim. Very rarely, however, the quest that shows up is titled " [...] ". The objectives for the quest are the same, and it can progress normally, however you get no quest markers for it, and the description is blank, preventing you from being able to check where you need to go in-game. There is no known solution for this, and its causes are unknown.
PS3 Sometimes upon leaving Whiterun towards battle, the Dragonborn can see all the civilians who killed, lying naked on the ground.
360 Once the main quest is completed, prior to starting the Legion quests, and Louis Letrush has been assassinated by one of Mavin's thugs over the theft of Frost, the Dragonborn may see copies of him running into Whiterun for shelter during the battle, while another copy stays buried up to his waist in the ground in the main road, beside Whiterun Stables.
Your family/household members/followers from Whiterun may appear outside the gates and immediately be attacked by Whiterun guards (if playing Imperial) and Stormcloaks won't spawn. Use of console to set quest complete is the only way to fix this.
(XBox 360) There is a potential solution for this bug that worked for me, but it involved a unique set of circumstances. It may only work if you own Breezehome and have spoken with Aventus Aretino but haven't yet gone to sleep so as to be kidnapped by the Dark Brotherhood. Before exiting Whiterun (the gates where the family members/followers are attacked), go into Breezehome and go to sleep. You will be taken away to the Abandoned Shack. The Battle for Whiterun quest will show as completed once you awaken in the Abandoned Shack, and your family members/followers will remain unharmed (though it may take a day or two before they return to your home).