Sack of Winterfell

The Sack of Winterfell is an event in the War of the Five Kings. It occurs off-screen in the episode "Valar Morghulis."

Prelude
After news of the Fall of Winterfell to a band of ironborn led by Theon Greyjoy and the death of Ser Rodrik Cassel reached Robb Stark, his vassal Roose Bolton, Lord of the Dreadfort offers to send word to his bastard son to gather a force to retake Winterfell. King Robb agrees but demands Theon be kept alive so he can execute him personally.

Some time later, after Lord Bolton reassures him that his son is only a day's ride from Winterfell, Robb orders him to send word to Ramsay that any ironborn who surrenders will be granted mercy, with the exception of Theon. Robb hopes to turn Theon's garrison against him and spare his people and brothers from any retaliation.

The Siege
After the Northern force reaches Winterfell, a horn is sounded constantly as means of demoralizing Theon and his force. Maester Luwin, bound to serve whoever rules Winterfell, suggests Theon to escape through one of the hidden passageways and flee to the Wall and take the Black. Theon, fearing that Jon Snow will kill him, rejects Luwin's counsel and opts for a different plan.

Theon gathers his men in Winterfell's main yard and delivers a speech to them, in which he exhorts them to resist the Northmen and, even though they will all die, attain glory, ending with a frenzied cry of the prayer to the Drowned God: "What is dead may never die". Theon's men respond in various degrees of emotion. After the cry is over, Dagmer Cleftjaw knocks Theon unconscious and tells the men that it's time to go home.

As Theon's men place a hood over his head, Luwin comes out into the yard asking to know what's happening. The sole response Dagmer gives him is a spear thrust to the stomach.

After these events, Winterfell is put to the torch and its inhabitants are killed, captured or flee, leaving the castle empty. Luwin manages to get himself inside the godswood.

Aftermath
Bran and Rickon Stark emerge from the catacombs of Winterfell, where they had hidden with their protectors Osha and Hodor, to find Winterfell covered in smoke and dying flames and its people dead. They also find Summer and Shaggydog on the gates of the godswood and enter it, only to find an injured Luwin beside the weirwood heart tree. Luwin urges Bran and Rickon to go north to the Wall so their half-brother Jon can keep them safe. As they set to leave Luwin tells Osha to protect the two boys and then asks her to mercy-kill him. Afterward, the four leave the home of House Stark.

Despite having sworn them safe passage, Ramsay Snow flippantly broke his promise, and flayed all of the ironborn alive anyway. All, that is, except for Theon, whom he brought to the Dreadfort's dungeons for prolonged and sadistic torture.

Ramsay subsequently sent false reports to his father Roose via messenger-raven, claiming that it was the Ironborn who had burned out Winterfell. In reality, the Boltons had agreed on this course of action long in advance when it became clear that the Lannisters would probably win the war after a victory at the Battle of the Blackwater. Ramsay's deception kept King Robb and his mother Catelyn from realizing that it was truly Ramsay and his Bolton soldiers who burned Winterfell. Robb had no idea that the Boltons had turned on him until months later at the betrayal of the Red Wedding, when Roose personally drove a dagger through his heart.

In the books
In the A Song of Ice and Fire novels, the Sack of Winterfell takes place in a different manner. The Northern forces are rallied by Ser Rodrik Cassel, while the ironborn refuse to yield, as Theon takes the people of Winterfell hostage and threatens to hang them one by one if the Northern host doesn't disperse, starting with Rodrik's daughter, Beth.

The fate of the siege is decided when a host of men gathered by Theon's collaborator, a Northman known only as "Reek", arrives. Though his force is outnumbered four-to-one, Ser Rodrik's forces thought them to be friends and were slaughtered in a surprise attack. Theon, believing himself saved, opens the gates and allows them inside. "Reek" turns out to be none other than Ramsay Snow, who orders his forces to kill everyone in Winterfell (except the two grandsons of Lord Frey) and put it to the torch.

By the end of the siege, Winterfell is burned and most of its people massacred, though Bran, Rickon, Hodor and Osha still escape, while Theon and some residents of Winterfell are imprisoned by Ramsay.

One of the ironborn is not killed or captured by the Boltons - Wex. He hides in the godswood, witnessing the atrocities that Ramsay and his men commit. He follows Osha and Rickon, and later arrives at the White Harbor and informs Lord Wyman Manderly what he has seen.