Between 1905 and 1911, Hesse became father of three sons.
In 1911, Hesse set out for India in an attempt to view his problems from a distance. He felt, that his time in Gaienhofen was about to end. Back from India, Hesse had difficulties in adjusting to life in Gaienhofen. He left Germany and was never to return again. Together with his family, Hesse moved to Bern, the capital of Switzerland. In the novel, Rosshalde (1914) Hesse explored the question of whether the artist should marry. The author's replay was negative and reflected the author's own difficulties. During these years his wife suffered from growing mental instability and his son was seriously ill. Hesse spent the years of World War I in Switzerland, attacking the prevailing moods of militarism and nationalism. He also promoted the interests of prisoners of war. Hesse, who shared with Aldous Huxley belief in the need for spiritual self-realization, was called a traitor by his countrymen.
From 1914 - 1918, Hesse went through difficult times: he realized, that his marriage was in trouble. Fighting national fanaticism, Hesse called for a return to humanity and reason. After separation from his wife in 1919, Hesse moved to Montagnola/ Ticino. Eventually during the summer of 1923 their marriage ended but hesse remarried to Ruth Wenger in 1924. This marriage lasted only for four years. Hesse's breakthrough novel was Demian which was published in 1919, which featured a story of a man who was torn between his orderly bourgeois existence and chaotic world of sensuality. Hesse's demian dealt with the problem and experience of change. From 1922 to 1927, Hesse was extremely productive because he wrote many novels during this period like Siddartha which was on the early life of Gautama Buddha, a Brahman son rebels against his father's teaching and traditions, Steppenwolf in which the protagonist, harry haller goes through his mid-life crisis and must chose between life of action and contemplation and Narcissus and Goldmund which was a pseudomedieval tale about an abbot and his wordly pupil, both in search of the Great Mother.