In 1848, he returned to Vienna, intending to finish his studies in Padua, which at that time was in the possession of Austria. However, the upheavals at that time enlisted his sympathies. Ottendorfer joined the Von der Tann volunteer corps, and briefly served in the first Schleswig-Holstein War. On returning to Vienna during the Vienna Rebellion, he found the revolutionaries in control of the government, and joined the mobile guard as a 1st lieutenant. During the storming of the city by government forces in October, he was in the battalion that was commanded by Robert Blum.