As a younger son, Leopold was educated for the church, although he was never formally a member of the clergy. To provide him an income, he held various Prince-Bishoprics within the Holy Roman Empire, despite not being a member of the clergy. They included Halberstadt, Passau, Breslau, Olmütz and Strasbourg. He was also appointed to the Bishopric of Halberstadt in 1627, Magdeburg in 1629 and Bremen in 1635. All three were in the Protestant north, where the infrastructure of the Catholic church had long since disappeared; he never exercised power and all three were secularised in 1648. During his lifetime, the Habsburg rulers of Spain and the Holy Roman Empire faced the 1568 to 1648 Dutch Revolt, the 1618 to 1648 Thirty Years War and other conflicts, including the Franco-Spanish War. Despite his reluctance, Ferdinand made him Imperial commander in 1639, largely due to lack of reliable subordinates; he resigned following a disastrous defeat at Second Breitenfeld in 1642, a battle fought against the advice of his generals. He was re-appointed after another Imperial defeat at the 1645 Battle of Jankau, then Governor of the Spanish Netherlands in 1647. In that role, he helped negotiate an end to the war in the 1648 Treaty of Westphalia; the Franco-Spanish war continued, obliging him to remain in Brussels until 1656.
Art collection
While in Brussels, he employed David Teniers the Younger as keeper of his collection, spending immense sums on works by Frans Snyders, Peter Snayers, Daniel Seghers, Peter Franchoys, Frans Wouters, Jan van den Hoecke, Pieter Thijs, Jan van de Venne and others. He also acquired a number of Italian masters, purchased from the sale of collections owned by Bartolomeo della Nave and Charles I. His most prized pieces engraved in the book Theatrum Pictorium, which is often called the first "art catalogue". When the tomb of Childeric I, an early Merovingian king, was discovered in 1653 by a mason doing repairs in the church of Saint-Brice in Tournai, it was Leopold Wilhelm who had the find published in Latin. On his return to Vienna in 1656, his collection relocated to the Hofburg Palace, where Jan Anton van der Baren, a Flemish priest and artist, served as director. The collection was bequeathed to his nephew Leopold I, and is now part of the collections of the Kunsthistorisches Museum in Vienna. He played an active role in court politics and was close to his stepmother, Eleonora of Mantua, who shared his interest in Italian art and was a prominent supporter of the Catholic Counter-Reformation. Although suggested as a candidate to replace Ferdinand as Holy Roman Emperor in 1657, he ensured his nephew Leopold I was elected when he reached 18 in July 1658.