Ivelich fought the French in Prussia during the War of the Fourth Coalition and then against the Swedes in the Finnish War of 1808, during which he was promoted to Major General and was awarded the Order of St. George for bravery. He participated in the Battle of Lemo against the Swedes (1808-1809); based on merit, on 18 October 1808, he was elevated to major general. He participated in the Patriotic War of 1812 and served in multiple major battles, including Borodino, at which he was severely wounded.