The battle was an attempt by Euron Greyjoy to take Blackgard, the capital of the Borderlands, and to seize the region from (initially) Trevyr Blackgard, and later Eddin Blackgard. It required a naval assault and an attack on the city gates by land. Lord Eddin Blackgard, the newly named Lord of Ebonheart, led the defense of the city. He successfully destroyed a large portion of Euron's fleet through the use of gunpowder, but was unable to prevent the Greyjoy army (commanded by Lord Ryden Spyre) from landing and gaining the walls of the city. However, late-arriving reinforcements under Lord Hendrick Grayburn and Ser William Blackfell defeated Spyre's army, resulting in a decisive Blackgard-Grayburn victory.
Almost immediately after the outbreak of the War of the Five Kings, four of the five claimants of the Iron Throne; Joffrey Baratheon, Stannis Baratheon, Renly Baratheon and Balon Greyjoy, struggled to take control over the Borderlands, a wild and "untameable" region of arid badlands that act as the borders for the Stormlands. Each king had their own motives for capturing the Wastelands. Renly and Stannis mainly wanted to regain control over Storm's End, Joffrey (or rather Tywin), wanted to stop the advance of Stannis by blocking the Stormlands from him, and Balon wanted to conquer the Stormlands for his own purposes, dispatching his brother Victarion to the wage war in the Stormlands against Stannis' garrison still stationed there (who were under command of Ser Glendon Estermont) in the early stages of the War of the Five Kings. In the end, the three Baratheon factions abandoned the Borderlands when Stannis, Renly and Joffrey died.
However, the deaths of the three Baratheon kings worked in the favour for the King in the Iron Islands, who still wanted to take the region. Balon, along with Lord Edgarth Bergen - who was already planning on betraying the Blackgards and had been conspiring with the Greyjoys even since the earliest stages of the war - devised a plot to overthrow the Great House. Step-by-step, they would eliminate key members of House Blackgard. First, Edgarth convinced Elyse Blackgard's abusive husband, the knight Marlen Rosby, to lure Dyron Blackgard to Rosby, where he would be assassinated by House Bergen. In order to do so, Marlen beat and abused Elyse relentlessly, knowing that Dyron's spies had been keeping an eye on Rosby ever since Elyse was wed. Eventually, the plan succeeded, and Dyron was assassinated just after he entered the Stormlands. With Dyron Blackgard out of the picture, the title of Lord of Ebonheart would eventually pass down to Lucan Blackgard, who had a reputation for being weak, dim-witted, and an horrible leader. However, Trevyr Blackgard, having the foresight of a master chess player, predicted this would happen and before his death, he disinherited Lucan and refused to let him take on the role as Lord of Ebonheart. Eventually, and surprisingly, Eddin Blackgard became the new heir. Eddin, who was more intelligent, stronger, and cleverer than Lucan, would be the perfect leader when Trevyr would've died.
Concurrently, Cersei Lannister had already become aware of Balon Greyjoy's schemes. She tasked her spy, Grand Maester Pycelle, to assassinate Eddin before the attack on Blackgard can take place. Cersei also dispatched the Blackwatch, the Iron Throne's elite special forces, to further this plan. Pycelle then contacted Cersei's cousin, Arton Lannister, who had become a ward and hostage of House Blackgard, and asked him to betray his captors and in return, Cersei offered him to return to Casterly Rock to his family. Arton agreed to help and during the Funeral of Trevyr Blackgard, he told Eddin about a peace summit being set up by the Lannisters at a remote castle near Casterly Rock. Arton tried to persuade Eddin more by claiming that he trusts his family and that they always pay their debts. Eddin claimed to attend the peace summit. However, he was already aware of Arton's betrayal ever since his father warned him about this, shortly before his death. Eddin ordered Arton to be taken out silently, before the battle took place.
Before Edgarth Bergen was exposed by Marlen Rosby, he had been sending ships, soldiers and weaponry to House Greyjoy and also funded them with sizeable amounts of gold. However, Grayson Mercer, the acting Lord of Dunharrow, had become suspicious of the Bergens (initially believing them to secretly be supporting Stannis Baratheon) and so had to be taken out. Edgarth ordered his servant, Grandon (who had infiltrated House Mercer's guard and posed as one of their men-at-arms), to poison Grayson's wine at his nameday feast. Grandon succeeded, and Grayson died by poisoning.
The maester of Dunharrow, Caledon, felt that it was his duty to investigate the death of Grayson. After looking into the murder, he discovered the plot devised by Houses Bergen and Greyjoy. He quickly wrote a letter to Eddin telling him about House Bergen's betrayal. However, he was killed by Grandon before he could reveal the names of the traitors. Fortunately, he was able to inform Eddin about Marlen Rosby's involvement. When Eddin interrogated Marlen about it, he broke down and admitted his betrayal. Furthermore, he also told Eddin about the Bergens and their allegiance to House Greyjoy.
After Balon's death, Euron reshaped the original plans to take the Wastelands. Instead of a more tactical approach, Euron planned a full-on assault on the city entirely.
BattleHouse Spyre's fleet, commanded by Lord Ryden Spyre, sweeps into the Bay of Asterion and approaches the city. However, when the Spyres enter the bay, the Blackgard fleet is notably absent. The fleet, commanded by Brant Tymber, uses the foggy mist to sneak up at the Spyres. When the fleet is surrounded, the ships use a sophisticated method of gunpowder to fire at the ships. A destructive and spectacular naval battle then takes place. Several Greyjoy and Blackgard ships are being sunk in the process. While the ships still battle, the Damned Whore successfully evades the Blackgard ships and they fire several burning rocks onto Blackgard's gates. Eddin orders the archers to fire on the soldiers, and are successful in taking a few down.
However, the last ball being fired launches straight through the gates. The walls are destroyed and the Greyjoy forces continue on land. While most of the ships are destroyed, a large and bloody fight on the shores take place. Eddin Mercer himself commands the land troops, but is unable to hold them off. More Blackgards than Greyjoys fall and House Spyre's forces, accompanied by troops loyal to House Bergen, enter the city.
Eddin commands the remaining soldiers to hold the line and defend the Warrens. Eddin himself draws a sword and fights along. The battle in the Warrens continues for a few hours, but the morale of the Blackgard troops is deteriorating and Eddin is unable to fight them all off. He commands Mercer to hold the Bronze District, if the Greyjoys manage to pass through. Mercer then calls his men and they retreat to the upper districts, while Eddin still fends off the other Greyjoys.
Unfortunately, the losses in Eddin's troops are too great and they are forced to retreat. The gates of the Bronze District are closed and Eddin gives a final speech to his last men. He rallies his forces behind him and they get ready to defend the upper districts from the Greyjoys.
At this point, Hendrick Grayburn's army arrives in concert with Blackgard reinforcements. House Grayburn's cavalry smash Ryden's forces and rout them although some are able to retreat in good order to their landing vessels. Ryden is dragged reluctantly from the battlefield by loyal retainers. Edgarth Bergen is attempting to flee as well, but an unknown Spyre officer knocks him out cold and leaves him to be taken captive by the Blackgards
In the aftermath of the battle, the city had sustained heavy damages, mainly in the lower sections (i.e. the Warrens, Border Gate, Bronze District, etc.). Furthermore, the Blackgards lost large portions of their army and almost their entire fleet had been obliterated. However, the Greyjoys have gotten it worse after the battle. Simultaneously with the Assault of Blackgard, Victarion Greyjoy was able to hold Storm's End for a few days, only to be defeated by late-arriving reinforcements of House Baratheon, who liberated the castle. As a result, Victarion lost more than half of his army. This, combined with the smashing defeat at Blackgard meant for the Greyjoys to have lost so many forces, that they are forced to withdraw from the ongoing war for a time, but are coming back for another battle once they are fully recovered.
Hendrick Grayburn, whose forces proved vital in the defence of the city, was honoured by House Blackgard for his support. Eddin asked the Lord of Brightbank how he could reward him. Hendrick replied by asking Eddin to lend him an amount of House Blackgard's household guard. Even though he was reluctant at first, Eddin agreed later on and gave Hendrick a sizeable amount of soldiers to support him in his quest to reclaim Brightbank.
After the battle, Edgarth Bergen has been betrayed by House Greyjoy as he was struck on the head and knocked out cold. When Eddin's men drag an unconscious Edgarth, jokingly stating that he has been "sleeping on the battlefield", Eddin orders him to be taken to his son in the dungeons to await further judgement.
Ultimately, Edgarth's execution was gruesome and supposedly "well-fitting". Eddin ordered him to be hanged, drawn and quartered publicly. Edgarth's remains were scattered across the Borderlands in five settlements.