The idea for the opera was proposed to Humperdinck by his sister, who approached him about writing music for songs that she had written for her children for Christmas based on "Hansel and Gretel". After several revisions, the musical sketches and the songs were turned into a full-scale opera.
Humperdinck composed Hansel and Gretel in Frankfurt in 1891 and 1892. The opera was first performed in Weimar on 23 December 1893, conducted by Richard Strauss. It has been associated with Christmas since its earliest performances and today it is still most often performed at Christmas time.