In 1812 Jósika obtained a commission in a cavalry regiment of the Hungarian army, which was engaged in a campaign in Italy as part of the Sixth Coalition of the Napoleonic Wars. He was present at the second battle of the Mincio River in February 1814, serving under Austrian command against French and Italian troops, and was promoted to the rank of lieutenant. He was promoted to captain in March 1814, he remained in active service until Napoleon was defeated later that year. In 1815 he took part in a campaign in France, and from 1816 to 1818, he was stationed in Vienna.