The 218th Infantry served in the invasion of Poland as a reserve division for the 4th Army. Subsequently, it was moved to the west facing the Maginot line, which it attacked in May 1940 as part of the 7th Army. Following a period of occupation duty and also briefly a return to civilian life, its soldiers were sent to the Eastern Front in the winter of 1941. It remained on the Eastern Front until the end of the war, retreating with Army Group North back through the Baltic states, until the Army group was trapped in Courland. The 218th Infantry Division, still in Courland, surrendered to the Soviets on 8 May 1945.