The submarine was ordered on 9 June 1937 and laid down on 12 October 1937 as K XXIII at the Rotterdamsche Droogdok Maatschappij, Rotterdam. During construction she was renamed O 23, and was finally launched on 5 December 1939. Following the German invasion of 10 May 1940, O 23 was hastily commissioned, still incomplete, and sailed for England on 13 May to be completed at the Thornycroft shipyard at Southampton.[2]
During the war she operated in the North Sea, the Mediterranean Sea and the Indian Ocean. O 23 made twenty patrols during the war in the course of which she sank or damaged five ships. She survived the war and was decommissioned on 1 December 1948, being sold for scrap in April of the following year.[2][3]