During World War II, Šilutė, then known as Heydekrug, was part of Germany's East Prussia. Initially, it was returned to Germany in 1939 after Hitler's ultimatum. In 1941, the town was granted city rights. A significant aspect of its wartime history involves the establishment of several prisoner-of-war camps, including Stalag 331 C/I-C, Stalag I-D, and Stalag Luft VI, which housed Allied POWs. In 1944, as the war approached, many residents, particularly Prussian Lithuanians and Germans, retreated to Germany. Soviet forces entered the town on October 10, 1944, marking the end of German control. The Klaipėda region was subsequently transferred to the Soviet Union.