Alexander's military career began probably during the Cossack uprising of Bohdan Zynoviy Mykhailovych Khmelnytsky.
In autumn 1663 under the leadership of Polish King John II Casimir Vasa took part in the expedition to Dniprovsky.
Shortly, he defected to the field of Prince Jerzy or George Sebastian Lubomirski opposite to the last King Vasa.
After the end of Lubomirski's rebellion, Polanowski entered in the service of the Crown Hetman Jan or John Sobieski (future elected King John III Sobieski), who during the free election in 1669 was the major candidate for the Polish Crow and therefore ruler of “The Commonwealth” (the whole Realm – nowadays Poland, Lithuania, Belarus, Ukraine, Latvia, etc.
In the years 1671-1676 he fought against the Turkish and Tartars troops, participating in the expedition to Bratslav, and fighting the Tatars in Chocimska campaign.