Execution of Eddard Stark

"My mother wishes me to let Lord Eddard join the Night's Watch... stripped of all titles and powers he would serve the realm in permanent exile. And my Lady Sansa has begged mercy for her father. But they have the soft hearts of women... so long as I'm your King treason shall never go unpunished! Ser Ilyn, bring me his head!"

- King Joffrey sentences Lord Eddard to die.

The Execution of Eddard Stark is a pivotal event in the nascent conflict caused by the death of Robert Baratheon, paving the way for its transformation into a full-fledged civil war.

False confession and execution
"I am Eddard Stark, Lord of Winterfell and Hand of the King. I come before you to confess my treason in the sight of gods and men. I betrayed the faith of my King and the trust of my friend Robert. I swore to protect and defend his children... but before his blood was cold, I plotted to murder his son... and seize the throne for myself. Let the High Septon and Baelor the Blessed bear witness to what I've said. Joffrey Baratheon... is the one true heir to the Iron Throne... by the grace of all the gods, Lord of the Seven Kingdoms and Protector of the Realm."

- Ned Stark

After agreeing to Cersei's terms, Ned is taken to the yard before the Great Sept of Baelor to publicly confess his treason. Present for the confession are King Joffrey, Queen Cersei, Sansa, Lord Baelish, Lord Varys, Grand Maester Pycelle, the High Septon, several Kingsguard and the King's Justice, Ser Ilyn Payne. Unbeknownst to all of them, Arya Stark is also present, standing at the feet of the statue of Baelor the Blessed.

Ned is taken by two goldcloaks before the King and his entourage, while the people of the city gathered yell insults at him. Aware of his daughter's pleas, he relents and gives the false confession the Queen demanded: confessing his plot to murder Joffrey and seize the throne for himself.

The Grand Maester intervenes and after speaking of the justice and mercy of the gods he asks the King what will be done with the traitor. The people yell out in anger until Joffrey holds out his hand to speak. He mentions that his mother wishes to let Eddard join the Night's Watch and live the remainder of his days at the Wall, stripped of lands and titles, while his betrothed, Lady Sansa, has begged mercy for her father. However, he dismisses the two as soft-hearted women and promises that, for as long as he's King, treason will never go unpunished. Then he turns to Ser Ilyn Payne and demands Ned Stark's head.

The crowd calls out for Ned's death. Sansa desperately begs for her father's life, only to be restrained by a Kingsguard. The Queen also asks her son to reconsider his sentence. Varys also runs to the King, who remains adamant in his decision. Lord Eddard is pushed to his knees by two Kingsguard, and Ser Ilyn puts on a black hood to conceal his face. He then swings Ice, the greatsword of House Stark itself, and takes the head of the Lord of Winterfell.

Aftermath
"Renly Baratheon is nothing to me, nor Stannis neither! Why should they rule over me and mine from some flowery seat in the south? What do they know of the Wall? or the Wolfswood? Even their gods are wrong! Why shouldn't we rule ourselves again? It was the dragons we bowed to... and now the dragons are dead. There sits the only king I mean to bend my knee to... the King in the North!"

- Jon Umber

The execution of Ned Stark shatters the plans of House Lannister to make peace with House Stark and House Tully, allowing them to deal with both Renly and Stannis Baratheon. Tyrion Lannister laments that the execution "will haunt our family for a generation."

However, with Jaime Lannister a hostage of Robb Stark and cut from the Westerlands, Tywin Lannister decides to retreat to Harrenhal and orders Ser Gregor Clegane to keep sacking the Riverlands from Gods Eye to the Red Fork. He also sends Tyrion to the capital to rule as Hand of the King in his stead and rein in Joffrey and his mother and to have Lord Baelish, Grand Maester Pycelle and Lord Varys executed if he finds them committing any treasonous act.

Meanwhile, when the news of Ned's death reach the Northern and River lords, they choose not to support either of Robert's brothers, declaring independence from the Iron Throne under the rule of Robb as King in the North.

In the books
In the A Song of Ice and Fire novels, the execution occurs in an almost identical fashion to the TV series. There are only small differences, such as the fact that High Septon is the one who speaks of the justice and mercy of the gods, and he and Varys protest Joffrey's decision to execute Ned. The book also gives no indication that Ned spotted Arya in the crowd or instructed Yoren to protect her; Yoren seems to find her by chance.

Ser Barristan Selmy is present at the execution in the guise of Arstan Whitebeard, though this is not revealed until a later book, after he has joined the service of Daenerys Targaryen.