Ferrante II Gonzaga became the first duke of the city, hoping to succeed in the future to the great Duchy of Mantua.
Having no male heir, he bequeathed the Duchy of Guastalla to his daughter's husband Ferdinand Charles, Duke of Mantua.
His brother Giuseppe Gonzaga, the last duke of the city, took power in 1734 and saw the occupation by the Austrians in the so-called Battle of Guastalla.
Giuseppe Gonzaga died without heirs in 1746, and the Duchy of Guastalla was incorporated into Austrian Lombardy under the government of Maria Theresa of Austria in 1747.
With the Treaty of Aix-la-Chapelle (1748), Guastalla was joined to the Duchy of Parma and Piacenza, ruled by the Spanish Bourbons.