Overview
Joseph Ferdinand Leopold of Bavaria (28 October 1692 – 6 February 1699) was the son of Maximilian II Emanuel, Elector of Bavaria (1679–1705, 1714–1726) and his first wife, Maria Antonia of Austria, daughter of Leopold I, Holy Roman Emperor, maternal granddaughter of King Philip IV of Spain.
Youth
Prince Joseph Ferdinand was born in Vienna on October 28, 1692, son of Duke Maximilian II Emanuel, Elector of Bavaria, and Archduchess Maria Antonia, daughter of Emperor Leopold I. He was, therefore, a great-grandson of Philip IV of Spain and a great-nephew of Charles II of Spain.
His mother died soon after his birth and he was left in the charge of his grandfather, Holy Roman Emperor Leopold I, as his father was in Brussels, where he served as governor of the Spanish Netherlands from March 1692. On May 2, 1693, Josef Ferdinand, accompanied by the former household of his mother, left Vienna for Munich, where he arrived on 2 or 3 June.
Heir of Charles II
Charles II's mother, Mariana of Austria, supported the candidacy of Maximilian Emmanuel, Elector of Bavaria, husband of her granddaughter Maria Antonia, and then that of Joseph Ferdinand (who was descended from the first Habsburg king in Spain, Philip I of Castile, thirty-one different ways). The Bavarian claim found many supporters among the nobles unhappy with the German clique of Mariana of Neuburg, Charles II's wife. On her deathbed, Emperor Leopold I had forced his daughter, Maria Antonia (the Electoral Prince's mother), to waive her inheritance rights in order to limit the powers of the newborn.
From Wikipedia (CC BY-SA 4.0).