At the beginning of World War II in September 1939, she was initially deployed to lay minefields off the German coast, but was soon transferred to the Skagerrak where she inspected neutral shipping for contraband goods.
In late 1939, Z18 Hans Lüdemann helped to lay two offensive minefields off the English coast that claimed one destroyer and twenty merchant ships.
In July 1939, Z18 Hans Lüdemann joined her sisters Z17 Diether von Roeder and Z19 Hermann Künne making port visits in Norway.
[6] On the night of 17/18 October, Rear Admiral (Konteradmiral) Günther Lütjens, aboard his flagship Z21 Wilhelm Heidkamp, led Z16 Friedrich Eckoldt, Z17 Diether von Roeder, Z18 Hans Lüdemann, Z19 Hermann Künne, and Z20 Karl Galster as they laid a minefield off the mouth of the River Humber.
On the night of 12/13 November Z21 Wilhelm Heidkamp, now the flagship of the Commander of Destroyers (Führer der Zerstörer), Kapitän zur See (Captain) Friedrich Bonte, escorted Z18 Hans Lüdemann, Z19 Hermann Künne, and Z20 Karl Galster as they laid 288 magnetic mines in the Thames estuary.
[8] When they arrived off the Ofotfjord on the morning of 9 April, Z18 Hans Lüdemann and Z22 Anton Schmitt landed their troops at the Ramnes narrows to search for the coastal artillery positions that the Germans mistakenly believed to command the mouth of the fjord.
Z17 Diether von Roeder remained offshore to provide support if necessary and to serve as a picket ship in case the British intended to interfere with the operation.
Shortly after midnight, Z18 Hans Lüdemann was ordered to start fuelling from the whale factory ship SS Jan Wellem.
[10] On the night of 12/13 April, Commander (Fregattenkapitän) Erich Bey, the senior surviving German officer, received word to expect an attack the following day by British capital ships escorted by a large number of destroyers and supported by carrier aircraft.
The battleship Warspite and nine destroyers duly appeared on 13 April, although earlier than Bey had expected, and caught the Germans out of position.
The five operable destroyers, including Z18 Hans Lüdemann, charged out of Narvik harbor and engaged the British ships at long range from behind a smoke screen.
Lack of ammunition forced the German ships to retreat to the Rombaksfjorden (the easternmost branch of the Ofotfjord), east of Narvik, where they might attempt to ambush any pursuing British destroyers.
[11] Z18 Hans Lüdemann still had some ammunition and torpedoes left and took up position at the Straumen narrows with Z2 Georg Thiele to give the two remaining destroyers time to scuttle themselves at the head of the fjord.
The pursuing British destroyers initially engaged Z18 Hans Lüdemann, which had opened fire at a range of about 3 miles (4,800 m) to little effect.