Zoltán Kodály moved to Budapest in 1990, beginning his studies, as a member of the Eötvös College, in the Hungarian, German and composition departments of the Péter Pázmány University. He learned composition under János Koessler, completing his studies in 1904. After gaining a diploma as a teacher of Hungarian and German in 1905, in 1906 Kodály earned a doctorate with his dissertation entitled, "The stanza structure of Hungarian folksongs". In 1906-07 he went on a foreign study trip to Berlin and Paris. It was here that he became acquainted with the music of Debussy, which had a decisive influence on his development as a composer. Besides Debussy's music, it was his discovery of Hungarian folk music that had the strongest effect on him. As early as 1905 he went on a trip collecting folksongs. Thanks to his interest in folklore, he made friends with Béla Bartók. In 1906 they published a joint work, Hungarian folksongs. In March, 1910 they had composer's evenings one after the other, stepping out for the first time into the public sphere of Hungarian musical life. In 1911 they founded the New Hungarian Musical Association, and in 1913 submitted jointly A plan for a new universal collection of folksongs to the Kisfaludy Society. It was as a result of their research that Kodály wrote in 1917 his first comprehensive study entitled, The pentatonic scale in Hungarian folk music.
Kodály became a teacher at the Music Academy in 1907. At first he taught harmonics, but in the 1917/18 academic year he started his own class in composition. In 1919 he was appointed deputy director of the Music Academy; he kept this position even during the Hungarian Republic of Soviets. Consequently, after the fall of the Republic of Soviets, disciplinary proceedings were started against him and he was sent on a two-year leave. He taught composition at the Music Academy continuously between 1922 and 1940. It was as a result of this work that the Kodály school was born, whose members became, from the thirties, Kodály's colleagues, and as composers, musicologists, teachers, conductors, and the moving spirits of the Singing Youth movement, decisive figures in Hungarian musical life.
In 1923, the fiftieth anniversary of the unification of Pest and Buda was celebrated with a festive concert. Kodály's Psalmus Hungaricus was received with a great ovation and made him the key figure of Hungarian musical life. From this time onwards he facilitated the musical education of youth with his choir works, singing and music reading practices, and took up the fight through his writings, statements and reform initiatives against "musical illiteracy". He also gained widespread recognition with his works – such as Háry János (1925-27), the Székely fonó (Transylvanian spinning room) (1924-32), Marosszéki táncok (Dances of Marosszék) (1930), Galántai táncok (Dances of Galánta) (1933), Budavári Te Deum (Te Deum of Buda Castle) (1936), Felszállott a páva (The Peacock) (1939) and the Concerto (1940) - in Hungary and abroad alike. He was elected corresponding member of the Hungarian Academy of Sciences in 1943. During the last years of the war he tried to help those persecuted; finally, during the siege of Budapest, he and his wife hid at first in the cellar of a convent and then in the air-raid shelter of the Opera House.
After 1945 Kodály took an active part in the rebuilding of the country: he became chairman of the board of the Music College, of the Hungarian Arts Council, and of the Free Association of Musicians, and was also elected chairman of the Hungarian Academy of Sciences (1946-49). He went on concert tours in several Western European countries, the USA and the Soviet Union. Various universities gave him honorary doctorates, several academies made him an honorary member, he became chairman of the International Folk Music Council (1961), and the International Music Pedagogical Society elected him their honorary chairman (1964). His plans dating back to the first half of the century – the spreading of musical education and the institutionally directed scholarly research into Hungarian folk music – were also realised: as a result of the work of the Folk Music Research Group of the Hungarian Academy of Sciences, directed by him, the first five volumes of the Hungarian Folk Music Archives were published between 1951 and 1967, and everyday singing lessons were introduced in almost 120 general schools. In the last two decades of his life he continued composing works with a pedagogical aim, as well as composing a number of works for choir (Kállai kettős - Kálló double dance, 1950; Zrínyi szózata – Zrínyi's Appeal, 1954; A 114. genfi zsoltár – Geneva psalm, 1958), and that is when he composed his last large-scale orchestral work, the Szimfónia (Symphony) (1962).