She was named after her mother's paternal aunt Holy Roman Empress Eleonora, who was also her godmother. The marriage of Eleonora's parents was made with the purpose to reinforce the claims of the Nevers branch of the House of Gonzaga to the Duchies of Mantua and Montferrat when the main line would become extinct. The Duke of Nevers, a vassal of the Kingdom of France, had to face the opposition of Ferrante II Gonzaga, Duke of Guastalla, who counted with the support of the Holy Roman Empire, the Kingdom of Spain and Duchy of Savoy, and thus started the War of the Mantuan Succession, during which infant Eleonora, with her parents and older brother Charles leave Mantua, but returned one year later after the signing of the Treaty of Cherasco (19 June 1631), under which were recognized the rights of Duke Charles of Nevers over the Duchies of Mantua (as the closest male relative of the extinct main line of the House of Gonzaga) and Montferrat (due to the marriage of his heir with Maria Gonzaga, the last surviving scion of the main Gonzaga line and heiress of that Duchy, which was demonstrably heritable by females since the Gonzagas had acquired it through marriage to Margherita Paleologa in 1540); however one month later (30 August 1631), Eleonora's father died of tuberculosis, and began a series of political conflicts between Duke Charles and her daughter-in-law, who ended with the banishment of Margaret of Savoy (Maria's mother) from Mantua.