"Don Juan d'Austria" was built by the Stabilimento Tecnico Triestino (STT) shipyard. She was laid down in October 1861, and her completed hull was launched on 26 July 1862. Fitting-out work was completed the following year and she was commissioned into the Austrian fleet the following year. She proved to be very wet forward, owing to her open bow, and as a result, tended to handle poorly. In February 1864, the Austrian Empire joined Prussia in the Second Schleswig War against Denmark. "Don Juan d'Austria" was sent with the wooden ship of the line and two smaller vessels under Vice Admiral Bernhard von Wüllerstorf-Urbair to reinforce a smaller force consisting of the screw frigates and under then-Captain Wilhelm von Tegetthoff. After the two groups combined in Den Helder, the Netherlands, they proceeded to Cuxhaven on 27 June, arriving three days later. The now outnumbered Danish fleet remained in port for the rest of the war and did not seek battle with the Austro-Prussian squadron. Instead, the Austrian and Prussian naval forces supported operations to capture the islands off the western Danish coast.