He was born at Graz, the son of Charles II, Archduke of Austria, and Maria Anna of Bavaria. He was educated by the Jesuits and later attended the University of Ingolstadt. After completing his studies in 1595, he acceded to his hereditary lands (where his older cousin, Archduke Maximilian III of Austria, had acted as regent between 1593 and 1595) and made a pilgrimage to Loreto and Rome. Shortly afterwards, he began the suppression of Protestantism in his territories.
With the Oñate treaty, Ferdinand obtained the support of the Spanish Habsburgs in the succession of his childless cousin Matthias, in exchange for concessions in Alsace and Italy. In 1617, he was elected King of Bohemia by the Bohemian diet, in 1618, King of Hungary by the Hungarian estates, and in 1619, Holy Roman Emperor.
His devout Catholicism and negative regard of Protestantism caused immediate turmoil in his non-Catholic subjects, especially in Bohemia. He did not wish to uphold the religious liberties granted by the Letter of Majesty conceded, signed by the previous emperor, Rudolph II, which had guaranteed the freedom of religion to the nobles and the inhabitants of the cities. Additionally, Ferdinand was an absolutist monarch and infringed several historical privileges of the nobles. Given the relatively great number of Protestants in the kingdom, including some of the nobles, the king's unpopularity soon caused the Bohemian Revolt. The Second Defenestration of Prague of 22 May 1618 is considered the first step of the Thirty Years' War.
In the following events he remained one of the staunchest backers of the Anti-Protestant Counter Reformation efforts as one of the heads of the German Catholic League. Ferdinand succeeded Matthias as Holy Roman Emperor in 1619. Supported by the Catholic League and the Kings of Spain and the Polish–Lithuanian Commonwealth, Ferdinand decided to reclaim his possession in Bohemia and to quench the rebels. On 8 November 1620 his troops, led by the Flemish general Johann Tserclaes, Count of Tilly, smashed the rebels of Frederick V, who had been elected as rival King in 1619. After Frederick's flight to the Netherlands, Ferdinand ordered a massive effort to bring about re-conversion to Catholicism in Bohemia and Austria, causing Protestantism there to nearly disappear in the following decades, and reduced the Diet's power.
In 1625, despite the subsidies received from Spain and the Pope, Ferdinand was in a bad financial situation. In order to muster an imperial army to continue the war, he applied to Albrecht von Wallenstein, one of the richest men in Bohemia: the latter accepted on condition that he could keep total control over the direction of the war, as well as over the booties taken during the operations. Wallenstein was able to recruit some 30,000 men (later expanded up to 100,000), with whom he was able to defeat the Protestants in Silesia, Anhalt and Denmark. In the wake of these Catholic military successes, in 1629 Ferdinand issued the Edict of Restitution, by which all the lands stripped from Catholics after the Peace of Passau of 1552 would be returned.
His military success caused the tottering Protestants to call in Gustavus II Adolphus, King of Sweden. Soon, some of Ferdinand's allies began to complain about the excessive power exercised by Wallenstein, as well as the ruthless methods he used to finance his vast army. Ferdinand replied by firing the Bohemian general in 1630. The leadership of the war thenceforth passed to Tilly, who was however unable to stop the Swedish march from northern Germany towards Austria. Some historians directly blame Ferdinand for the large civilian loss of life in the Sack of Magdeburg in 1631: he had instructed Tilly to enforce the edict of Restitution upon the Electorate of Saxony, his orders causing the Belgian general to move the Catholic armies east, ultimately to Leipzig, where they suffered their first substantial defeat at the hands of the Adolphus' Swedes in the First Battle of Breitenfeld (1631).
Tilly died in battle in 1632. Wallenstein was recalled, being able to muster an army in only a week, and expelled the Swedes from Bohemia. However, in November 1632 the Catholics were defeated in the Battle of Lützen (1632), where Gustavus Adolphus was himself killed. A period of minor operations followed, perhaps because of Wallenstein's ambiguous conduct, which ended with his assassination in 1634.
Despite Wallenstein's fall, the imperial forces recaptured Regensburg and were victorious in the Battle of Nördlingen (1634). The Swedish army was substantially weakened, and the fear that the Habsburg's power would become overwhelming caused France, led by Louis XIII of France and Cardinal Richelieu, to enter the war on the Protestant side. (Louis's father Henry IV of France had once been a Huguenot leader.) In 1635 Ferdinand signed his last important act, the Peace of Prague (1635), yet this did not end the war.
Ferdinand died in 1637, leaving to his son Ferdinand III, Holy Roman Emperor, an empire still engulfed in a war and whose fortunes seemed to be increasingly chaotic. Ferdinand II was buried in his Mausoleum in Graz. His heart was interred in the Herzgruft (heart crypt) of the Augustinian Church, Vienna.
In 1600, Ferdinand married Maria Anna of Bavaria (1574-1616), daughter of Duke William V of Bavaria. They had seven children:Archduchess Christine (25 May 1601 – 12/21 June 1601)
Archduke Charles (25 May 1603)
Archduke John-Charles (1 November 1605 – 26 December 1619)
Ferdinand III (13 July 1608 – 2 April 1657) married:
1631 Infanta Maria Anna of Spain
1648 Maria Leopoldine of Austria
1651 Eleanor Gonzaga (1630–1686)
Archduchess Maria Anna of Austria (13 January 1610 – 25 September 1665)
Archduchess Cecilia Renata of Austria (16 July 1611 – 24 March 1644), who married her cousin Władysław IV Vasa, King of Poland.
Archduke Leopold Wilhelm of Austria (1614–1662).
In 1622, he married Eleonore of Mantua (Gonzaga) (1598–1655), the daughter of Duke Vincenzo I of Mantua and Eleonora de' Medici, at Innsbruck.
Ferdinand II, by the grace of God elected Holy Roman Emperor, forever August, King in Germany, King of Hungary, Bohemia, Dalmatia, Croatia, Slavonia, Rama, Serbia, Galicia, Lodomeria, Cumania, Bulgaria, Archduke of Austria, Duke of Burgundy, Brabant, Styria, Carinthia, Carniola, Margrave of Moravia, Duke of Luxemburg, of the Higher and Lower Silesia, of Württemberg and Teck, Prince of Swabia, Count of Habsburg, Tyrol, Kyburg and Goritia, Marquess of the Holy Roman Empire, Burgovia, the Higher and Lower Lusace, Lord of the Marquisate of Slavonia, of Port Naon and Salines, etc. etc.