Trick-or-treating grew out of several older European customs linked to Halloween’s ancestor festivals, especially the Celtic Samhain and the Christian All Hallows’ celebrations, and only became the kid-focused candy night we know in North America in the 20th century.

Ancient and medieval roots

  • Many historians connect the roots of trick-or-treating to the ancient Celtic festival of Samhain , when people left food outside or made offerings to wandering spirits at the end of the harvest season.
  • In medieval Britain and Ireland, poor people and children practiced “souling” on All Hallows’ Eve, going door to door to say prayers for the dead in exchange for food or “soul cakes,” a clear early version of going house to house for offerings.

Guising and costumes

  • Another strand is “guising,” where children dressed up in costumes and masks and went around their communities performing songs, jokes, or small acts in return for food, drink, or coins.
  • This mix of disguises, night-time wandering, and rewards for performances helped establish the idea that costumed visitors could expect some kind of treat when they knocked on doors.

From pranks to “trick or treat”

  • By the late 19th and early 20th century, Halloween in places like the U.S. and Canada had a reputation for pranks, vandalism, and rowdy behavior by young people, especially on October 31.
  • Communities and parents gradually encouraged organized door-to-door visiting and parties as a way to channel that mischievous “trick” energy into a more controlled exchange of treats instead of property damage.

The phrase “trick or treat”

  • The phrase “trick or treat” itself appears in print from North America in the early 20th century, reflecting a playful “give us a treat or we might play a prank” bargain at the door.
  • Over time, the “trick” element faded in most neighborhoods, leaving the familiar, mostly harmless ritual of children saying “trick or treat” and receiving candy with no real threat attached.

Modern trick-or-treating

  • Modern trick-or-treating, with children in store-bought or homemade costumes going house to house for candy in the evening of October 31, was firmly established in the U.S. by the mid-1900s and later spread widely in Canada and other countries.
  • Today, it blends those older themes—honoring the dead, disguises against spirits, and exchanging small gifts—with contemporary safety measures, neighborhood events, and a focus on fun for kids rather than ritual or mischief.

Information gathered from public forums or data available on the internet and portrayed here.