Haakon was the younger son of Magnus Eriksson, king of both Norway and Sweden. His older brother Eric was meant to succeed their father on the throne of Sweden, while Haakon was made king of Norway in his father's lifetime. Magnus greatly favored Haakon over Eric, leading to the latter's rebellion and seizure of Southern Sweden. Eric died in 1359, and Haakon became co-ruler of Sweden with his father three years later. The two reigned over Sweden together until 1364, when they were deposed in favor of Magnus' sororal nephew, Albert of Mecklenburg, by a clique of exiled Swedish noblemen led by Bo Jonsson Grip. Magnus and Haakon tried to retake the Swedish throne, but without success.
In 1363, Haakon married Margaret, daughter of Valdemar IV of Denmark. The marriage, itself a significant element in the Nordic power struggle, resulted in the birth of one son, Olaf. Haakon's continuous conflicts with his father-in-law ended only with the latter's death in 1375. Haakon seized the opportunity to have his son elected Valdemar's successor, defeating the claims of his and his wife's Mecklenburg relatives.
Upon his death in 1380, Haakon was succeeded by Olaf, with Margaret as regent. Olaf died childless seven years later, and Haakon's widow proceeded to assert authority over all three Scandinavian kingdoms as their first female monarch.
Haakon was born in 1340 (possibly in mid-August), most likely in Sweden, though the exact date and location of his birth remain unknown. He was the younger son of Magnus Eriksson, king of Sweden and Norway, and Blanche of Namur. His older brother Eric was a rival king of Sweden in opposition to his father between 1356 and 1359. Haakon and his paternal family belonged to the Swedish House of Bjelbo, which had succeeded the House of Eric in Sweden and the House of Sverre in Norway. Haakon was a great-grandson of Haakon V of Norway through his only legitimate daughter, Ingeborg, and was considered an acceptable heir to the throne by the Norwegian nobility. Another noteworthy ancestor of Haakon, through his paternal grandfather Eric Magnusson, Duke of Södermanland, is Magnus III of Sweden.
Haakon was raised in Norway, to prepare the young prince to later rule the kingdom in his own right. During the early autumn of 1343, the most prominent members of the Norwegian Council of the Realm attended a meeting with Magnus at Varberg Castle. On 15 August 1343, letters were issued throughout Norway and Sweden stating that the King and the Council had decided to place Haakon on the throne of Norway.
Barely a year later, representatives of the cities and the general public assembled at Båhus Castle, where they hailed Haakon as their king and took the oath of perpetual fealty and servitude to him. Though the meeting at Båhus Castle forged historic ties to the old elective monarchy in Norway, the acclamation documents created by the Council of the Realm stipulated that Haakon was to rule over only parts of Norway, and it was also carefully documented that the Norwegian Law of Succession would apply if he were to die leaving no legitimate son, thereby ensuring that the hereditary monarchy would be upheld. The next in line to the Norwegian throne would then be his older brother Eric and his descendants, but the provision became moot when Eric died in 1359. The meetings at Varberg Castle in 1343 and at Båhus Castle in 1344 were later properly ratified in another meeting in the port city of Bergen as late as 1350.
Magnus abdicated his Norwegian throne sometime between 8 and 18 August in 1355. Haakon would then rule as the sole king in the kingdom, though his father continued to exercise control over Norway in the following years, albeit not in name anymore. The first documented event in which Haakon acted as sole king and ruler over his kingdom was on 22 January 1358, when he sent a letter of approval for the privileges in the capital city of Oslo. Norway in 1355 was actually partitioned between Haakon and Magnus: Magnus had specifically requested the territories of Hålogaland and the Norwegian islands in the North Sea at the ratification meeting in Bergen in 1350. Magnus additionally held the territories of Tønsberg and Skien, and he was also the real ruler over the territories of Borgar and most of Bohuslän which were held as personal fiefs by Queen Blanche. Because of this, the realm of Magnus was centered in the south-east, up against the important south-Swedish countryside and the Swedish-held Scania province.
As king, Haakon was immediately pulled into his father's internal strife in Sweden, where a growing conflict eventually had erupted into open warfare. Eric was discontent with his father's rule, likely because he had not been granted a membership in the Swedish Council of the Realm, and because of favouritism Magnus had shown his youngest son. With Eric as a rallying figure, a part of Sweden's most powerful nobility rose up in rebellion against the rule of Magnus. The rebellion was short-lived however and Magnus and Eric made peace with each other a year after the conflict erupted. Eric "XII" was elevated to King of Sweden and was made co-ruler with his father in the subsequent peace agreement. Eric was also given dominion over Southern Sweden. It all took a dramatic turn when Eric suddenly died of the plague in 1359. In accordance with the peace agreement between father and eldest son in 1357, the Swedish nobility soon deposed Magnus and elected Haakon as King of Sweden in Uppsala 15 February 1362. From 1357 Haakon had styled himself "Lord of Sweden", but dropped this title upon his election and styled himself "King of Norway and Sweden".
In 1359, Valdemar IV of Denmark's younger daughter, Margaret, was bethroted to Haakon in a marriage contract intended to be a part of a larger alliance treaty between Magnus and Valdemar. It was presumed that Valdemar would assist Magnus in the aforementioned rebellion, started by his eldest son Eric, by invading the province of Scania, which had been pawned by Christopher II of Denmark before his death in 1332 to Magnus and had been under Swedish rule since. Valdemar in turn would receive Helsingborg Castle as compensation for that assistance, but in June 1359 Eric unexpectedly died of the plague and Magnus tried to renege on his promise to return the castle to the Danish Crown. Valdemar was far too ambitious a ruler to have his plan to reassemble the Danish kingdom fall into pieces, and so he proceeded to invade Scania in 1360 with his mercenary army. The Danish forces quickly occupied the province and started besieging Helsingborg Castle, eventually forcing the Swedish garrison to surrender and capturing the castle. When the castle was captured, Valdermar had virtually regained control over all of Scania, and when Magnus proved to be unable to retake the province by force, it simply passed back to Danish rule. Further strife between the two kingdoms would put the marriage contract on hold for a few years until the two parties eventually reconciled in 1363; Haakon and Margaret were married that year in the Copenhagen Cathedral. Margaret's marriage was broadly considered to be a part of the Nordic power struggle.
In 1363, former members of the Swedish Council of the Realm, led by Bo Jonsson Grip, arrived at the court in the Duchy of Mecklenburg-Schwerin. The Swedish noblemen promptly persuaded Duke Albert II of Mecklenburg, who had gained influence in the affairs of Sweden by marrying Magnus' sister Euphemia, to intervene against Magnus and Haakon in Sweden and depose them both in favour of his and Euphemia's son Albert. In 1364, Duke Albert enlisted military support from several powerful North German noblemen and proceeded to swiftly invade and conquer Sweden and subsequently installed his son as the new king. In November 1365, the younger Albert was formally hailed as Sweden's new king, though he had already been crowned on 18 February 1364. Magnus sought refuge with his son in Norway where they immediately planned the reconquest of Sweden. After an invasion, a temporary truce was established between the two warring parties, and though Haakon and Magnus had lost control over much of Sweden, they still maintained control over the important provinces of Västergötland, Dalsland and Värmland.
In early 1365, Haakon and Magnus assembled a large army in Västergötland, consisting mainly of Norwegians, but also a large number of Swedes from the said province, and marched on the German-held city of Stockholm. On 27 February, Haakon issued a proclamation against Albert of Mecklenburg and his supporters, encouraging the local populace to stir up in rebellion against the German usurper. The Norwegian army entered Uppland through Västerås and clashed against the Swedish-German army in the disastrous Battle of Gataskogen where Haakon and Magnus suffered a devastating defeat and Magnus was captured and taken prisoner by the Germans; which he would remain for six years.
The chief foreign policy of Haakon was now to retrieve Sweden from the Germans and his father from captivity. He was still in possession of West Sweden and found that he could rely on the support from several noblemen who were displeased with the Germans. The war between Norway and Sweden continued, and Haakon soon found himself in need of allies. He entered into an alliance with King Valdemar, the father of his wife, which was something that later would dramatically concentrate the Norwegian foreign policy to the east, rather than to the traditional west. After a turbulent conflict and war against the North German cities and the Hanseatic League, Haakon was again free to turn his attention to Sweden, and launched a successful campaign against the Germans in Sweden. The military campaign ended in the Siege of Stockholm in 1371, where it looked like Haakon could decisively defeat the Germans and acquire revenge for his defeat at the Battle of Gataskogen; but Albert and his German supporters managed to withstand the siege and Haakon was forced to sign a peace treaty. The treaty was signed on 14 August 1371, and Haakon would have to be content with having his father released from captivity against a large ransom. When released, Magnus resumed ruling his remaining domains in Norway and Sweden until his death in 1374 only three years later.
In 1361, Valdemar had invaded and conquered the Swedish province of Scania, as well as the two islands of Öland and Gotland, and captured the major Hanseatic town of Visby in the process. In 1361, the Hanseatic League's fleet launched a counter-strike at the Danish fleet, culminating in the Battle of Helsingborg in which the Danish fleet inflicted a devastating defeat upon the League's fleet. Furthermore, the League was forced to accept a humiliating truce, which eventually led to the unfavourable Treaty of Vordingborg, severely curtailing the League's power and influence. In Norway, Haakon had shifted his political and foreign affairs towards the east, and the reconquest of his Swedish kingdom was in particular his strongest motivation for the alliance with the recuperating Danish kingdom. The alliance between the Norwegians and the Danes threatened to shift the political and military power in the Nordic and Baltic areas, and in 1365 a series of German protests in the city of Bergen eventually forced the Hanseatic office on Bryggen in the city to be closed until 1366, which temporarily damaged the trade for the kingdom. Valdemar was unable to enforce the fragile peace with the Hanseatic cities, and in 1367 the League founded the Confederation of Cologne against Denmark and Norway to counter the growing ambitions of the two allied kings. The Confederation renewed their alliance with German-held Sweden and assembled a large fleet of warships and subsequently assaulted the Norwegian coast and continued to raid it all the way to Agder. Also, the Confederation launched a successful campaign against Valdemar in Denmark, which turned out to be disastrous for Valdemar's plans to reassemble the Danish kingdom. The Confederation raided and pillaged the Danish coast, invaded the province of Danish-held Scania, and even captured and looted the city of Copenhagen through a successful siege. This, in combination with the rebellious nobles in Jutland, forced Valdemar to flee his kingdom during Easter in 1368. Realizing the futility in a prolonged and costly war, as well as Haakon's wavering support for the disastrous conflict, Valdemar appointed his friend and advisor, Rigsdrost Henning Podebusk, to negotiate peace with the Confederation in his absence. The Confederation agreed to a truce, but only on the promise of having Valdemar acknowledge their right to tax exemption on trade across the entire Baltic Sea and renewed fishing rights in the Danish Sound. In addition to this, the Confederation forced Valdemar to grant the Hanseatic League a considerable amount of influence over the future Danish king-elections, including the right to veto against any throne candidate. Lastly, the Confederation put several towns on the coast of Scania and Helsingborg Castle under the control of the Hanseatic League for a fixed period of fifteen years.
On 24 May 1370, representatives from the Hanseatic cities, Denmark and Norway signed the Treaty of Stralsund at Båhus Castle and formally ended the war between them, the treaty included an extension of the already established truce for an additional five years. Through this treaty, the Hanseatic League reached its pinnacle of power in the region with a virtual monopoly on lucrative trade. The defeat at the hands of the Hanseatic cities was another humiliating blow to the foreign policies of Haakon in the east. Not only did the power of the monarch gradually weaken under the mounting pressure and influence of the Hanseatic cities, but the Norwegian trade also suffered as a consequence of the Hanseatic monopoly. Haakon became less interested in Danish affairs following the military failures against the Hanseatic cities, and would again turn his attention to his chief foreign policy of retaking Sweden from the Germans, something which he would have some limited success with in the following years. However, Haakon would gain a renewed interest in Danish affairs when the opportunity to have his son elected king of Denmark arose upon Valdemar's death in 1375.
On 24 October 1375, Valdemar succumbed to illness and died at Gurre Castle in Zealand. The new monarch would have to be elected by the Danish Council of the Realm and any potential candidate had to be approved by the Hanseatic League. As Valdemar left no immediate clear successor to the throne, two candidates were put forward for the election: Haakon and Margaret suggested their only son, Olav, as a claimant to the throne. Their brother-in-law Henry of Mecklenburg (widower of Margaret's sister older Ingeborg and another son of Haakon's aunt Euphemia) in turn suggested his son (their nephew) Albert as a rival claimant. Haakon, having already lost a substantial portion of his Swedish realm to the Germans, would go to great and costly lengths to assure his son's accession to the Danish throne. To accomplish this, Haakon borrowed large sums of money and offered it to the Hanseatic League in return for the League's neutrality in the upcoming election, which they promptly accepted. In addition to this, the Danish Council of the Realm was more inclined to a potential union and alliance with Norway, largely because of anti-German sentiments within the Council, and the general reluctance to have a second German ruler in Scandinavia. On 3 May 1376, Olav was elected king in Slagelse, succeeding his grandfather. The election proved to be a major victory for Haakon and his foreign ambitions, curtailing the German influence while greatly expanding his own over much of Scandinavia.
In 1349, the Black Death was brought to Bergen on board an English merchant ship to devastating effects, killing between 50% and 60% of the population, leaving the kingdom in a period of social and economic decline. The kingdom's financial framework (which was originally weak) virtually collapsed as the plague ravaged through the realm, and the aggressive foreign policies of Haakon would in addition take a heavy toll on the kingdom's decaying economy. In 1371, Haakon acquired the release of his father from German imprisonment against a large ransom sum of 12,000 silver marks, which alone was more than the kingdom's ordinary tax incomes just before the outbreak of the plague. A special tax had to be imposed on Haakon's subjects to pay for the ransom. In 1379, Haakon resolved the succession dispute over the Earldom of Orkney, a Norwegian dignity located within the Kingdom of Scotland. On 2 August the same year, at Marstrand near Tønsberg, Haakon invested and confirmed the title of Earl of Orkney upon Henry Sinclair, Baron of Roslin (a grandson of Maol Íosa V, Earl of Strathearn) over the rival claim of Sinclair's cousin, Malise Sparre. In return, Sinclair pledged to pay a sum of 1000 nobles before 11 November the same year, and when called upon, was to serve the Norwegian king on Orkney or elsewhere with 100 equipped and armed men for up to three months. As a security for upholding this arrangement, Sinclair had to leave behind valued hostages when he departed for his earldom. It is unknown if Haakon ever attempted to call upon the forces pledged by Sinclair, or if the agreed sum was ever actually paid in full. Shortly before his death in 1380, Haakon permitted the hostages to return home. Furthermore, throughout Haakon's reign he reportedly had an unproblematic relationship with the church. Also, throughout his rule, especially after the loss of Sweden to the Germans, a noticeable number of Swedish noblemen pledged their support to Haakon and settled on Norwegian lands. The generally accepted reason was because of their displeasure towards the German usurper and his favoritism towards his own kinsmen. Curiously enough, German noblemen from Mecklenburg reportedly entered the service of Haakon during his reign.
Throughout the reign of Haakon, the Norwegian military was extensively reformed. The military structure was altered from that of the traditional leidang peasant conscription to under the direct control of loyal Norwegian lords. His Norwegian predecessor had pursued a domestic policy to establish a functional civil service in his realm, also extending to the military. This was however not continued by Haakon who elected to transfer more power and military responsibilities on to loyal lords. As a consequence, Haakon would be able to field much larger armies, but it became increasingly expensive to maintain this system. Because of the war against Sweden and the aggressive Norwegian policies in the east, Haakon had to mortgage and borrow money at an unprecedented scale to maintain his armies, and had to increasingly rely on the Norwegian nobility and the rich German merchants. The substantial rise in foreign debt would eventually come to shift the political power in Norway, and gradually weakened the power of the monarch.
Nearing his final days, Haakon was exhausted by the almost constant warfare and the straining conflict with his cousin, Albert of Mecklenburg. It has been speculated that this, in addition to the considerable financial difficulties of Haakon's reign, may have contributed to his early death. Haakon never ceased to pursue his inherited responsibility to reclaim the lost Swedish territories, and would in March 1380 issue letters to prepare for war against the Germans in Sweden. The letters requested that the leidang fleet should be assembled and made ready for departure. Apparently, the Germans had broken the previous peace treaty and conspired to wage war against Haakon. However, there are no existing records of any war or battles fought during this period of time. Sometime during the late summer or early in the autumn Haakon died in Oslo, barely reaching the age of forty. He was buried in St. Mary's Church in Oslo. His son succeeded him as the King of Norway with Queen Margaret acting as his regent.