German submarine U-865

German submarine U-865 was a Type IXC/40 U-boat of the Nazi German Kriegsmarine built for service during the Second World War. She was laid down in Bremen, Germany on 5 January 1943, and launched on 12 July 1943.

She had one commander, Oberleutnant zur See Dietrich Stellmacher, for her two patrols. She had a crew complement of 59.

She did not sink any shipping on her two patrols, and went missing after leaving Trondheim in Norway on 9 September 1944, with all hands lost.

In late June/ early July, 1944, she was attacked by an RAF B-24 Liberator, which did some damage to her, however she in turn did some damage to the attacking aircraft with the submarine's flak gun, setting the aircraft on fire. Both the U-boat and aircraft were forced to return to their respective bases.