Whether you like it, hate it or just use it to decorate, you probably think of candy corn as a Halloween treat. But in the beginning, it was associated more with chickens than the spooky holiday.

Candy corn’s origins are a little iffy, but it seems to have come out around the 1880s, a time when candy companies were mixing up slurries of mellowcreme and molding the confection into the shape of pumpkins, chestnuts, turnips and other agricultural products. Farmers made up about half of the American labor force, and companies marketed agriculture-themed candies to children in farm country all year round.

Enter candy corn, which featured the innovation of three hand-layered colors. Oral histories identify the inventor of candy corn as George Renninger, an employee at Wunderle Candy Company in Philadelphia. Wunderle was the first company to sell these multi-colored treats made of sugar and corn syrup, according to the National Confectioners Association.

But it was the Goelitz Candy Company—now the Jelly Belly Candy Company—that really popularized the candy. In 1898, Goelitz picked up the recipe and started marketing the kernels as a candy called “Chicken Feed,” writes Rebecca Rupp in National Geographic. That’s because before World War I, most Americans didn’t really think of corn as people food.

“There were no sweet hybrids in those days,” writes Samira Kawash, author of Candy: A Century of Panic and Pleasure, in The Atlantic. “Corn was coarse and cheap and not very tasty: good food for pigs and chickens. It wasn't until war-time wheat shortages in 1917 that any but the poorest Americans would have considered corn flour, corn meal, or corn bread acceptable foodstuffs.”

Even after World War I, candy corn maintained its association with chickens. Packages of Goelitz’s candy corn from the 1920s displayed a rooster and the motto, “King of the Candy Corn Fields.”

In the first half of the 20th century, candy corn became a common “penny candy.” These were the types of treats kids could buy in bulk for very little money. Kids most likely thought of them as candies to eat year-round than special ones to get on Halloween, which wasn’t yet specifically associated with candy. Candy corn might appear at Halloween parties, but also at celebrations for Thanksgiving and Easter.

“As Halloween became more and more dominated by candy beginning in the 1950s, candy corn increasingly became the candy for Halloween,” Kawash writes. “There was a dramatic spike in October advertising of candy corn beginning in the 1950s. Other kinds of candy were advertised for Halloween too, but they were advertised just as heavily during the rest of the year.”

Today, while it’s easy to find candy corn year-round (the National Confectioners Association estimates more than 35 million pounds of the candy are sold every year), it’s most prominent in October when, on the 30th, National Candy Corn Day honors the original “chicken feed” treat.

The Food That Built America

Watch every season of the hit show The Food That Built America. Available to stream now.

Watch now