He participated in the Greater Poland Uprising (1848) (Poznań uprising against the Prussians) and the Hungarian revolution in 1848-1849 (the Polish Legion fought in Hungary during the war). After the fall of the uprising, he emigrated to the Ottoman Empire, where he enlisted in the army. There he adopted a new name, Mustafa Celalettin Pasha, and was circumcised and converted to Islam in 1849. He married Saffet Khanum, a daughter of Omer Pasha, a native Serbian who converted to Islam; they had one son, Hasan Enver Pasha.