|Although this article is based on canonical information, the actual name of this subject is pure conjecture.
The massacre in King's Landing was an event during the War of the Five Kings. Acting on King Joffrey's orders, the City Watch of King's Landing led by Commander Janos Slynt tracks down and murders several of the bastard offspring of the late King Robert Baratheon.
After Joffrey learns of Robert's bastard children, as well as hearing the (unbeknownst to him, accurate) rumors that his real father is actually his own uncle Jaime, he realizes that his enemies may think that Robert's bastards have a better claim to the throne than he does. In response to this threat, he orders the City Watch of King's Landing to hunt down and kill all the bastards.
Under the leadership of Commander Janos Slynt, the Watch carry out this mission. They enter the brothel owned by Petyr Baelish in search of Mhaegen, whose infant daughter Barra is one of Robert's bastards. Slynt is unmoved when Ros reminds him that Littlefinger is Master of Coin and the source of his income, as he states that his orders come from someone who does not care what Littlefinger thinks. Mhaegan and Barra are soon located, and Slynt orders one of his men to kill the baby. When the man cannot go through with it, Slynt carries out the deed himself, leaving Mhaegen devastated and everyone else horrified.
Three boys are discovered in Flea Bottom, and two are stabbed while another is drowned. Another baby is killed in plain view of a crowd.
Tobho Mott is interrogated and reveals that Gendry has left the city as a recruit of the Night's Watch. He says that Gendry can be identified by his bull's head helm. Gendry and Arya are travelling north on the Kingsroad with Yoren's recruits.
The massacre was held in plain view of the population of King's Landing, who were horrified at the slaughter of so many innocent children, even if they weren't aware of their status as royal bastards. This caused tensions to rise among the smallfolk, who already despised the Lannisters and King Joffrey. For the more learned, who had heard the rumors that Joffrey was a bastard born of incest between Cersei and Jaime, the fact that the City Watch were directly targeting and killing Robert's bastards heightened suspicions about Joffrey's true parentage.
Ros struggles to continue her work as a prostitute having witnessed the murder of Barra. Littlefinger threatens her with a tale about selling an unhappy girl to a depraved customer in order to recoup his investment. He orders her to return happy after a night off.
Slynt dines with acting Hand of the King Tyrion, who questions him about the massacre of the royal bastards. Slynt freely admits his involvement but will not reveal who ordered the attack. Tyrion has Slynt arrested and exiled to the Night's Watch and installs Bronn as Commander of the City Watch in his place. Cersei confronts Tyrion about his actions. He warns that she is losing the support of the people, who believe "The Queen slaughters babies", but she claims that she does not care. He concludes that Joffrey ordered the massacre, having initially suspected that it was Cersei.
A group of Lannister soldiers, under command of Ser Amory Lorch, ambush Yoren and his recruits in a second attempt to find and kill Gendry (a smaller group attacked Yoren and his party earlier.) They are believed to be successful when one of them, Polliver, kills one of the child recruits that Arya identifies as Gendry (due to the bull's head helm lying next to him), but is in fact Lommy.
Gendry is the only one of Robert's bastards confirmed to still be alive. It does not mean, though, that all the rest of Robert's bastards (or most of them) were present in King's Landing during the massacre, and that all of them were killed; in addition to Barra, only four are actually shown to be killed on-screen. According to Maggy's prophecy ("The King will have twenty children"), there are allegedly fifteen more of Robert's bastards, thus some of them may still be alive.
In the books
In the A Song of Ice and Fire novels, the massacre of Robert's bastards is ordered by Cersei (not Joffrey), shortly before the arrival of Tyrion to the capital. This was not the first time Cersei ordered the death of a bastard child of her husband; according to Littlefinger, a pair of twins Robert fathered on a servant at Casterly Rock had previously been murdered (it is unknown if the story is true).
Unlike in the show, in the book the massacre occurs off-screen; Tyrion relates to it while conversing with Slynt and Varys.
Barra is the only one reported to die in the books, while in the show at least four of Robert's other bastards were killed too. It is unknown whether in the books there were more of Robert's bastards at King's Landing at the time of the massacre, and how many of them (if at all) were killed.
Gendry is spared from the massacre because Varys had foreseen this would take place and arranged his escape from the city in Yoren's caravan. Robert's other only known bastards, Edric Storm and Mya Stone, are safe because they are away from King's Landing: Edric is in Storm's End and Mya is in the Vale.
|Scourging of the Riverlands:|
|The Young Wolf's campaign:||
Battle of the Green Fork · Battle of the Whispering Wood · Battle of the Camps · Liberation of Raventree Hall · Liberation of Stone Hedge · Battle of Oxcross · Sack of Ashemark · Battle of the Yellow Fork · Surrender of the Crag · Liberation of Harrenhal · Battle of Stone Mill · Red Wedding
Execution of Eddard Stark · Massacre in King's Landing · Riot of King's Landing · Battle of the Blackwater · Purple Wedding · Court trial of Tyrion Lannister · Second trial by combat of Tyrion Lannister · Assassination at the Tower of the Hand
|Ironborn invasion of the North:||
Fall of Moat Cailin · Raid on Torrhen's Square · First Battle of Deepwood Motte · Fall of Winterfell · Sack of Winterfell · Assault on the Dreadfort · Surrender of Moat Cailin · Second Battle of Deepwood Motte
|Rise and fall of the Sparrows:|
|War for the North:|
|Coup in Dorne:|