In the War of the Spanish Succession Starhemberg fought in Italy and Spain. Between 1706 and 1708 he was the commander-in-chief of the imperial army in Hungary, since this time he led the operations against the insurgents of Francis II Rákóczi. In 1708 he was appointed Supreme commander of the Austrians in Spain.
But in December he was forced to leave the city by the lack of support by the people of Madrid for the Habsburg pretender. After the defeats at the Battle of Brihuega and the Battle of Villaviciosa (1710), he had to pull back to Catalonia, where he was made viceroy, when Archduke Charles returned to Austria.
After the Peace of Utrecht (1713), archduke Charles, now Emperor Charles VI, ordered him to abandon Catalonia. He pulled back with his troops to Genua on English ships.
When he died in 1737, he was Governor of Slavonia.