Following the 1655 Swedish invasion of Poland during the Second Northern War, Czerniecki began his military career under the command of Jan "Sobiepan" Zamoyski. He took part in the battles of Gołąb and Warsaw in 1656. After the war with Sweden, he continued his military service fighting in the battle of Chudnov against Muscovite forces in 1660 and in the battle of Brayiliv against Crimean Tatars and Cossacks (Polish–Cossack–Tatar War) in 1666.