Zoltán Kodály revealed to his fellow Hungarians a whole world they had known little about. During the first decade of the 20th century, both he and Béla Bartók spent a great deal of time in the countryside, recording old folksongs with the help of Edison's phonograph. They subsequently transcribed and analyzed this treasure of melodies and made it the basis of their respective (and very different) musical styles, aiming to create a new Hungarian art music that expressed a national identity and at the same time had international appeal. In many of his works based on folk music, Kodály brought old Hungarian peasant culture to the concert hall and, in the case of Háry János, to the opera house.

This opera (actually a Singspiel with spoken dialog between the musical numbers) is based on the imaginary adventures of a Hungarian soldier during the time of Napoleon, after a 19th-century Hungarian epic poem by János Garay. Háry János (or John Háry), discharged from the army, sits in the pub of his native village, entertaining his friends with tall tales from his fighting days. One of his listeners is a smart student who sneezes whenever he hears something that definitely stretches credibility. Whether they believe the stories or not, however, the people at the inn never tire of listening to Háry's stories.

In his remarks written for the premiere, Kodály said of his hero:

[Háry] is much more than a Hungarian miles gloriosus [the famous soldier character created by the Roman playwright Plautus]; he is the incarnation of the spirit of creative imagination in Hungarian tales. He doesn't tell lies; he creates stories. He is a poet. What he relates may never have happened, yet he experienced it, so it is more real than truth.

All of the opera's vocal numbers used original folksongs, but in his six-movement orchestral suite, Kodály retained only one of these, in the third movement. In the suite, he strove to provide a symphonic synthesis that captured the entire emotional range of the opera, from humorous to fantastic to sentimental.

The first movement of the suite, "The Tale Begins," opens with the student's proverbial sneeze, and goes on to evoke the world of Hungarian folksong by using the pentatonic scale common in folksongs (this scale consists of the black keys of the piano). The second movement ("Viennese Musical Clock") utilizes a melody that suggests the West by outlining a major triad; yet this tune, too, turns out to be almost entirely pentatonic. In some sense, this is Vienna as imagined by a villager from Nagyabony, Hungary, just as in the Viennese scene of the opera, where the rooms of the Imperial castle are furnished with Hungarian peasant chests with tulips painted on them.

The third movement ("Song") was recorded by Bartók in a village in Southern Hungary in 1906. It has become one of the best-known Hungarian folksongs, expressing nostalgia for a far-away place with memories of love in spite of great poverty. In the opera, Háry and his sweetheart sing it as they think of their home village. In the suite, the melody is played first by a solo viola and then taken over by other instruments, with the expressive accompaniment of the cimbalom (Hungarian hammered dulcimer).

The fourth movement is "Napoleon's Battle." A humorous march melody, ending on a grotesque augmented-fourth interval, is introduced by the trombones with percussion accompaniment. The battle soon erupts with full force, but ends suddenly as the heroic Háry captures the French Emperor, who laments his sad fate in a funeral march with solo saxophone.

The theme of the famous fifth-movement "Intermezzo" comes from an early 19th-century Hungarian piano anthology, but Kodály added the dashing dotted rhythms that give it its unique flavor. It is a perfect example of the verbunkos style; the word, from the German Werbung (recruitment), refers to the musicians who played these rousing melodies as they accompanied army recruiters around the country. The trio (middle section), with its lyrical horn solo, comes from the repertoire of the famous 19th-century composer and fiddle player János Bihari.

The Emperor who makes his entrance in the final movement is none other than the Habsburg monarch Franz I; yet one would never guess it from the music. The pentatonic melodies and their orchestral treatment evoke China instead, or at least, the way Chinese music was perceived in the Western tradition of the early 1900s. But as one commentator has pointed out, "the Viennese Imperial court is just as far from Háry János's people as is the one in China."