German submarine U-2340 was a Type XXIII U-boat of Nazi Germany's Kriegsmarine during World War II. She was ordered on 20 September 1943, and was laid down on 18 August 1944 at Deutsche Werft AG, Hamburg, as yard number 494. She was launched on 28 September 1944 and commissioned under the command of Oberleutnant zur See Emil Klusmeier on 16 October 1944.