He fought in the Great Northern War between 1701 and 1705 against the Swedes in Livonia and the Polish–Lithuanian Commonwealth, but in 1708 briefly joined Hetman Ivan Mazepa who sided with Charles XII of Sweden against Peter I of Russia. Later, Danylo Apostol again switched sides and fought on the Russian side, distinguishing himself in the Battle of Poltava.
He engaged in warfare during the Great Northern War (1701-1705) against the Swedes in Livonia and the Polish–Lithuanian Commonwealth, but in 1708 briefly joined Hetman Ivan Mazepa who sided with Charles XII of Sweden against Peter I of Russia. Later, Danylo Apostol switched sides again and fought for the Russians, distinguishing himself at the Battle of Poltava.