Joseph Maroicic was born on 6 April 1812 in Oberswidnik, in the Sáros County of the Kingdom of Hungary (present-day Slovakia). Following in the footsteps of his father, Joseph Maroicic embarked on an army career and studied at the cadet school in 1825. In 1830 he became an ensign in the 60th Infantry Regiment. Promoted to lieutenant in 1831 and to first lieutenant in 1834, Maroicic was posted to the General Staff. Promoted to captain in 1843, Marocic took part in the First Italian War of Independence (1848). After the Italian war ended, he was promoted to major in 1849 and was made chief of staff of the 3rd Army Corps. After serving as chief of staff of the 4th Army Corps, Maroicic was promoted to lieutenant-colonel and transferred to the 1st Army Corps with which he served against the Hungarian insurrection. After a short stint at General Headquarters, Maroicic was promoted to colonel in November 1849 and was given command of the Oguliner Grenz Regiment nr. 3. In 1850 he was ennobled a Freiherr and was given the extended title "von Madonna del Monte" to his name.