Kosma was born József Kozma in Budapest, where his parents taught stenography and typing. He had a brother, Ákos. A maternal relative was the photographer László Moholy-Nagy, and another was the conductor Georg Solti. He started to play the piano at age five, and later took piano lessons. At the age of 11, he wrote his first opera, Christmas in the Trenches. After completing his education at the Gymnasium Franz-Josef, he attended the Academy of Music in Budapest, where he studied with Leo Weiner. He also studied with Béla Bartók at the Liszt Academy, receiving diplomas in composition and conducting. He won a grant to study in Berlin in 1928, where he met Lilli Apel, another musician, whom he later married. Kosma also met and studied with Hanns Eisler in Berlin. He became acquainted with Bertolt Brecht and Helene Weigel.
Kosma and his wife emigrated to Paris in 1933. Eventually, he met Jacques Prévert, who introduced him to Jean Renoir. During the 1930s Kosma teamed up with Prévert to set a number of Prévert’s poems to music, and have them recorded by popular singers. Several of these were hits. Kosma also composed scores to Renoir’s films including La Grande Illusion (1937), La Bête Humaine (The Human Beast, 1938), and La Règle du jeu (The Rules of the Game, 1939).
During World War II and the Occupation of France, Kosma was placed under house arrest in the Alpes-Maritimes region and was banned from composition. However, Prévert managed to arrange for Kosma to contribute music for films with other composers fronting for him. Under this arrangement, he wrote the “pantomime” of the music for Les Enfants du Paradis (1945), made under the occupation but released after the liberation. Among his other credits are the scores to Voyage Surprise (1946) and Le Testament du docteur Cordelier (The Doctor’s Horrible Experiment, 1959), the last of which was made for television. He was also known for writing the standard classical-jazz piece “Les feuilles mortes” (“Autumn Leaves”), with French lyrics by Prévert and later English lyrics by Johnny Mercer, which was derived from music in Marcel Carné’s film Les Portes de la Nuit (1946). The song was featured in the eponymous 1956 film starring Joan Crawford.