World War II broke out in 1939 when Nazi Germany invaded Poland. Initially, Gandhi favoured offering "non-violent moral support" to the British effort, but other Congressional leaders were offended by the unilateral inclusion of India in the war, without consultation of the people's representatives. All Congressmen resigned from office.[41] After long deliberations, Gandhi declared that India could not be party to a war ostensibly being fought for democratic freedom, while that freedom was denied to India itself. As the war progressed, Gandhi intensified his demand for independence, drafting a resolution calling for the British to Quit India. This was Gandhi's and the Congress Party's most definitive revolt aimed at securing the British exit from India.[42]Gandhi was criticised by some Congress party members and other Indian political groups, both pro-British and anti-British. Some felt that not supporting Britain more in its struggle against Nazi Germany was unethical. Others felt that Gandhi's refusal for India to participate in the war was insufficient and more direct opposition should be taken, while Britain fought against Nazism yet continued to contradict itself by refusing to grant India Independence. Quit India became the most forceful movement in the history of the struggle, with mass arrests and violence on an unprecedented scale.[43] Thousands of freedom fighters were killed or injured by police gunfire, and hundreds of thousands were arrested. Gandhi and his supporters made it clear they would not support the war effort unless India were granted immediate independence. He even clarified that this time the movement would not be stopped if individual acts of violence were committed, saying that the "ordered anarchy" around him was "worse than real anarchy." He called on all Congressmen and Indians to maintain discipline via ahimsa, and Karo Ya Maro ("Do or Die") in the cause of ultimate freedom.
Gandhi and the entire Congress Working Committee were arrested in Bombay by the British on 9 August 1942. Gandhi was held for two years in the Aga Khan Palace in Pune. It was here that Gandhi suffered two terrible blows in his personal life. His 50-year old secretary Mahadev Desai died of a heart attack 6 days later and his wife Kasturba died after 18 months imprisonment on 22 February 1944; six weeks later Gandhi suffered a severe malaria attack. He was released before the end of the war on 6 May 1944 because of his failing health and necessary surgery; the Raj did not want him to die in prison and enrage the nation. Although the Quit India movement had moderate success in its objective, the ruthless suppression of the movement brought order to India by the end of 1943. At the end of the war, the British gave clear indications that power would be transferred to Indian hands. At this point Gandhi called off the struggle, and around 100,000 political prisoners were released, including the Congress's leadership.