Nazi Germany invaded the Netherlands on 10 May 1940 and took control of the country. Some Amsterdam citizens sheltered Jews, thereby exposing themselves and their families to a high risk of being imprisoned or sent to concentration camps. More than 100,000 Dutch Jews were deported and murdered in Nazi concentration camps, including 56,521 victims in Auschwitz and a further number of 34,082 accounted for in Sobibor. Around 60,000 Jewish inhabitants, including Jewish prewar refugees from Austria and Germany, were living in Amsterdam at the time of the Nazi occupation. Only those provided with a safe haven, avoiding deportation and denunciation, or the very few who returned from the camps at the end of the war, managed to survive.

At first the German occupation authorities were very cautious, wanting to convince the city inhabitants of their sincerity. However, their outlook soon turned to cynicism and brutality. A cause in the change of their behaviour was an attack by a Dutch resistance fighter against a collaborator belonging to the paramilitary Dutch fascist organisation, the NSB. The injured man died and in response Heinrich Himmler ordered reprisals.427 Amsterdam Jews were arrested on 22 February 1941 and sent to Mauthausen concentration camp. Only two people survived.

Incensed, a broad spectrum of passive resistance was organized by the Dutch Underground. Trade unions, among them socialist and Communist Party activists, led the protest. Their outcry received support from white collar employees in the civil service and support from the local diocese of the Church. Approval was also given and encouraged by the Dutch government-in-exile under Queen Wilhelmina in London.

The German authorities were taken completely by surprise by the level of resistance known as the February strike. 300,000 people participated in the protest against the arrests of Jews. However, the occupier soon responded crudely and brutally, smashing union and illegal party activity. With the edifice of resistance removed the SS and German police apparatus, supported by collaborators in the Dutch auxiliary police, arrested thousands of defenceless Jews in Amsterdam's Jewish Quarter. The two main waves of arrest, culminating in deportation, occurred on 26 May 1943 and on 20 June 1943.

The most famous deportee was the young Jewish girl Anne Frank, whose safe hiding place with her family was betrayed and discovered in August, 1944. After a spell at the 'holding camp' in Westerbork Anna and her family were sent to Auschwitz, where her mother was murdered. From there she and her sister Margot were moved onto Bergen-Belsen concentration camp where they died amidst appalling and inhumane conditions in early 1945.[61]

At the end of the Second World War, and as a consequence of the Nazi occupation, Amsterdam was in a state of crisis. Communication with the rest of the country broke down, and food and fuel became scarce. Many citizens traveled to the countryside to forage. Dogs, cats, raw sugar beets, and tulip bulbs—cooked to a pulp—were consumed to stay alive.[62] Many trees in Amsterdam were cut down for fuel, and wood was taken from the houses, apartments and other buildings of deported Jews. The city was finally liberated by Canadian forces on 5 May 1945, shortly before the end of the war in Europe.