A nephew of king Stanislaus Augustus of Poland, his military career began in 1780 in the Austrian army, where he attained the rank of a colonel. In 1789, after leaving Austrian service, he joined the Polish army at the request of his uncle. Poniatowski, now in the rank of major general and commander of the Royal Guards, took part in the Polish–Russian War of 1792, leading the crown forces at the victorious Battle of Zieleńce. After the king's support for the Targowica Confederation Poniatowski was forced to resign. In 1794 he participated in the Kościuszko Uprising and was in charge of defending Warsaw for which he was subsequently exiled until 1798.