Kodály was born in Kecskemét, but spent most of his childhood in Galánta and Nagyszombat (now Trnava, Slovakia). His father was a keen amateur musician, and Kodaly was given violin lessons as a child. He also sang in a cathedral choir and wrote music despite having little formal musical eduction.
In 1900, Kodály entered Budapest University to study modern languages, and began to study music at the Academy of Music in Budapest, where his composition teacher was Hans Koessler.
Kodály was one of the first people to seriously study folk song, thus becoming one of the most significant early figures in the field of ethnomusicology. From 1905 he visited remote villages to collect songs and in 1906 wrote his thesis on Hungarian folk song ("Strophic Construction in Hungarian Folksong"). Around this time he met fellow composer Bela Bartok, to whom he introduced Hungarian folk song. The two went on to publish several collections of folk music together, and they both show the influence of folk music in their own compositions.
After being awarded his PhD, Kodály went to Paris where he studied with Charles Widor. There he discovered, and was influenced by, the music of Claude Debussy. Later in 1907, he moved back to Budapest, and was given a professorship at the Academy of Music there. He was able to continue on his folk music-collecting expiditions through World War I without interruption.
Kodály had been composing throughout this time, producing two string quartets, his sonatas for cello and piano and for solo cello, and his duo for violin and cello, but had no major success until 1923 when his Psalmus Hungaricus was premiered at a concert to celebrate the fiftieth anniversity of the union of Buda and Pest (Bartok's Dance Suite was premiered on the same occasion). Following this success, he travelled throughout Europe to conduct his music.
Kodály subsequently became very interested in the problems of music education, and wrote a good deal of educational music for schools, as well as books on the subject. His work in this field is acknowledged to have had a profound effect on musical education both inside and outside his home country. His ideas are sometimes referred to as the "Kodály Method", although this is something of a misnomer, as he did not actually work out a comprehensive method, rather laying down a set of principles to be followed in music education.
He continued to compose for professional ensembles also, with the Dances of Marosszék (1930, in versions for solo piano and for full orchestra), the Dances of Galanta (1933, for orchestra), the Peacock Variations (1939, commissioned by the Concertgebouw Orchestra to celebrate its fiftieth anniversery) and the Missa Brevis (1944, for soloists, chorus, orchestra and organ) among his better known works. The suite from his opera Háry Janós (1926) is also well known, though the opera itself is only rarely given.
Kodály remained in Budapest through World War II, retiring from teaching in 1942. In 1945 he became the president of the Hungarian Arts Council, and in 1962 was awarded the Order of the Hungarian People's Republic. Among his other posts were a presidency of the International Folk Music Council, and honorary presidency of the International Society for Music Education. He died in Budapest in 1967, one of the most respected and well known figures in the Hungarian arts.
In 1966, the year before Kodály's death, the Kodaly Quartet, a string quartet named in Kodály's honour, was formed.