Both brothers returned to the Commonwealth in 1648. Upon receiving the news of the death of king Władysław IV Vasa and the hostilities of the Khmelnytsky Uprising, they volunteered for the army. They both fought in the siege of Zamość. They founded and commanded their own banners ("chorągiew") of cavalry (one light, "cossack", and one heavy, of Polish hussars). Soon, the fortunes of war separated the brothers. In 1649, Jakub fought in the Battle of Zboriv. In 1652, Marek died in Tatar captivity after his capture at the Battle of Batih. John was promoted to the rank of "pułkownik" and fought with distinction in the Battle of Berestechko. A promising commander, John was sent by King John II Casimir as one of the envoys in the diplomatic mission of Mikołaj Bieganowski to the Ottoman Empire. There, Sobieski learned the Tatar language and the Turkish language and studied Turkish military traditions and tactics. It is likely he participated as part of the briefly allied Polish-Tatar forces in the 1655 Battle of Okhmativ.