With the outbreak of the war in 1939, Gandhi was dragged back into the political arena. He had loyally supported the Empire in the First World War. In the Boer War, even though his moral sympathies were with the Boers who were fighting for their independence, he had offered his services to the Empire out of a sense of loyalty. His feelings were different now, though, as stated, "my sympathies are wholly with the allies." He had came to believe "all war to be wholly wrong". He was also aware of the anomaly in Britain's position in fighting for freedom while denying India her. There were many patriots in India who felt that this was the hour to strike, since Britain's difficulty was India's opportunity. But Gandhi refused to countenance such an attitude. "We do not seek our independence out of Britain's ruin. That is not the way of non-violence."
The majority of Congress leaders would have welcomed participation in the war effort, provided India could do so as an equal partner with Britain. Gandhi did not believe in conditional non-violence, but he was realistic enough to know that he could not carry the majority of the Congress leaders, who were at best patriot-politicians, not saints, along the arduous path of absolute non-violence. Nor was he vain enough to insist on the Congress accepting his terms as the price of his leadership, though he knew that in the impending political crisis the party could not do without him. He therefore effaced himself and advised the nation to accept the Congress stand and pleaded with the British on its behalf.
But the British Government was in no mood to listen and Winston Churchill was frank enough to say that he had not become "the King's First Minister in order to preside at the liquidation of the British Empire." In the meanwhile, the situation rapidly deteriorated. The British were unable to stem the Japanese advance to the Indian border. The people were becoming increasingly restive and impatient, and Gandhi feared that if this excitement were not given an organized non-violent expression, it would break out in sporadic disorder and violence. Since the British did not seem able at that time to ensure India's defence and were not willing to let India defend herself, Gandhi called upon them to "Quit India" and prepared to organize satyagraha. Addressing historic session of the All India Congress Committee on August 7, 1942, he said : Our quarrel is not with the British people; we fight their imperialism. The proposal for the withdrawal of British power did not come out of anger. It came to enable India to play its due part at the present critical juncture."
He had not yet formulated any clear plan of action. In any case, he wanted to see the Viceroy before doing so. But the initiative was taken away from his hands, for in the early hours of the morning of August 9, he and other leaders of the Congress were arrested. Disorders broke out immediately all over India, many of them violent. The Government having deprived the people of non-violent leadership answered violence with greater violence till India virtually became a country under armed occupation.
Gandhi was interned in the Aga Khan Palace near Poona. He was greatly perturbed by the terror reigning in the country and at the British Government's charge that he was responsible for violence. He entered into a long correspondence with the Government which ended in his fasting for twenty-one years. During the fast, which began on February 10, 1943, his condition grew very critical and it was feared that he would not survive. Fortunately he did. This period in prison was one of tribulation and tragedy for Gandhi. Six days after his arrest, Mahadev Desai, his secretary and companion for twenty-four years, died suddenly of heart failure. In December 1943, Kasturbai fell ill and in February of the following year she, too, died.
The mental strain he had gone through his arrest told on Gandhi's health and six weeks after Kasturbai's death he had a severe attack of malaria. On May 3, the doctor's bulletin described his general condition as "giving rise to anxiety." The Government, embarrassed by the public agitation caused by the news of his illness, released him unconditionally on May 6. For a long time after, he was so weak that to conserve his energy he was obliged to observe long periods of silence.
But weak or strong, he could not sit idle and watch the situation in the country rapidly deteriorate. He asked to see the Viceroy but Lord Wavell declined to meet him. He knew that the British were encouraging Muslim demands to keep the Hindus and Muslims divided and were using this difference as an excuse for their continued occupation of India. Although his political career he had worked passionately for Hindu-Muslim accord. In 1919, he had made the Khilafat cause his own and had later fasted to bring about communal harmony. But the more he tried to placate the Muslims the more adamant and extravagant grew their demands until their leader Jinnah would be satisfied with nothing less than a separate state for the Muslims.