He joined the Imperial army. In 1634 he was already colonel of a regiment. He rose quickly through the ranks, partly by his competences, partly by his family name (Eleonora Gonzaga was the Empress of the Holy Roman Empire, wife of Emperor Ferdinand II). Gonzaga was one of the commanders at the Battle of Nördlingen (1634). In 1640, he became commander of the city of Vienna. Two bastions he built were named after him. In 1642 he commanded with Count Bruay the right wing of the imperial army in the disastrous Battle of Breitenfeld. A year later, he commanded an imperial army in Hungary.