SM U-21 was built at the Pola Navy Yard and was launched on 15 August 1916, and was the first of the class to be launched. U-21 was damaged in a diving trial in January 1917, requiring seven months for repairs. The U-boat was commissioned on 15 August 1917. In early October, U-21 conducted patrols off the Albanian coast, but a mid-October Mediterranean patrol was cut short by a leaky seal on her main hatch. After an additional eight months of repairs, U-21 again conducted patrols off Albania. A broken piston in her diesel engine cut short her war career. At Pola at the war's end,Gibson and Prendergast, p. 279. U-21 was ceded to Italy in 1920 as a war reparation and broken up. U-21 did not have any successes during the war.
