Langsdorff was born on the island of Rügen in 1894, the eldest son of a family with legal and religious traditions rather than a naval tradition. In 1898 the family moved to Düsseldorf, where they were neighbours of the family of Count (Graf) Maximilian von Spee, who was to become a German naval hero (while losing his entire command) in the Battle of the Falkland Islands in 1914. Influenced by his honoured neighbours, Langsdorff entered the Kiel Naval Academy against his parent's wishes in 1912. During the First World War the then-Lieutenant Langsdorff won his first Iron Cross at the Battle of Jutland in 1916 and subsequently worked in minesweepers.
In 1923 while he was posted to the navy office in Dresden he met Ruth Hager, whom he married in March 1924, with their son Johann being born on 14 December. In October 1925 he was posted to the Defence Ministry in Berlin to co-ordinate relations between the navy and the army. In 1927 Langsdorff was posted to the command of a torpedo boat flotilla and in April 1930 he was promoted to Lieutenant Commander. In 1931 he was recalled to Berlin as his administrative abilities were well-known and appreciated. Following the coming to power of the Nazis, Langsdorff requested duty at sea in 1934 but was instead appointed to the Interior Ministry.
In 1936 and 1937, while on board the new Admiral Graf Spee while on the staff of Admiral Bohen, Langsdorff participated in the German support of the Nationalist side in the Spanish Civil War. On 1 January 1937 Langsdorff was promoted to Captain, being given command of the Graf Spee in October 1938.
On 21 August 1939 the Graf Spee left port with orders to raid enemy commercial shipping in the South Atlantic following the outbreak of the Second World War. For the first three weeks of the war the ship hid in the open ocean east of Brazil while the German government determined how serious Britain was about the war. On 20th September, Graf Spee was released to carry out its orders.
Over the next ten weeks, Langsdorff and the Graf Spee were extremely successful, stopping and sinking nine British merchant ships, totalling over 50,000 tons, while avoiding killing anyone. However Langsdorff's luck ran out on the morning of 13 December when his lookouts reported sighting a British cruiser and two destroyers. It was only when Langsdorff had committed his ship to the attack that it became apparent that the destroyers were in fact light cruisers (HMS Ajax and HMNZS Achilles) in addition to the heavy cruiser HMS Exeter. At this point Langsdorff committed a grievous tactical error -- his ship outgunned all his opponents (having 11" calibre main guns, to Exeters 8" and Ajax and Achilles 6" guns), so he should have concentrated his fire on Exeter first before Graf Spee came into the range of the lighter ships. Instead, Langsdorff split his fire between the three targets, with the result that although Exeter was severely damaged and forced to withdraw within half an hour, the other ships got into range and scored 20 hits on the Graf Spee, including on the food stores and bakeries. Langsdorff decided to break off the action, and make for the neutral port of Montevideo in Uruguay to make emergency repairs.
The Uruguayan authorities followed international treaties and, although granting an extra 72 hours stay over the normal 24 hours, required that Graf Spee leave port by 8 p.m. on 17 December or else be interned for the duration of the war. Langsdorff sought orders from Berlin, and was given instructions that the ship was not to be interned in Uruguay (which was sympathetic to Britain); he could try to take the ship to the friendlier Buenos Aires in Argentina although it was thought that the channel was not sufficiently deep for a ship of Graf Spee's size; he could take the ship out to sea to battle the British forces again (though British propaganda was trying to persuade people that a large British force already lay in wait for him -- though in fact it would not be able to arrive for five days); or he could scuttle the ship. On the deadline, Graf Spee weighed anchor and left port heading for the Buenos Aires channel. However, on reaching the limit of Uruguayan territorial waters she stopped, and her crew was taken off by Argentine barges. Shortly thereafter, planted charges blew up the Graf Spee and she settled into the shallow water (today she has settled in the mud and lies in 7-8 metres of water, depending on the tide). The crew were taken to Buenos Aires, where they remained interned for the rest of the war. Langsdorff was taken to the Naval Hostel in Buenos Aires, where he wrote letters to his family and superiors, and on the evening of 19th December he lay on Graf Spee's battle ensign and shot himself.
Hans Langsdorff was buried in the German Cemetery in Buenos Aires, and was honoured by both sides in the battle for his honourable conduct.