Jack-o'-Lanterns Were Once Made Out of Turnips, Beets and Potatoes—Not Pumpkins.

The jack-o'-lantern comes from an old Irish tale about a man named Stingy Jack. According to folklore, Stingy Jack was out getting sloshed with the Devil when Jack convinced his drinking partner to turn himself into a coin to pay for the drinks without spending money. Jack then put the Devil, shaped like a coin, into his pocket, which also contained a silver cross that kept the Devil from transforming back. Jack promised to free the Devil as long as the Devil wouldn't bother him for a year, and if he died, the Devil could never claim his soul. Jack tricked the Devil again later, getting him to pick a piece of fruit out of a tree and then carving a cross into the bark when the Devil was in the branches. This trick bought Jack another 10 years of devil-free living.

When Jack finally died, God decided he wasn't fit for heaven, but the Devil had promised never to claim his soul for hell. So Jack was sent off to roam Earth with only a burning coal for light. He put the coal into a turnip as a lantern, and Stingy Jack became "Jack of the Lantern" or "Jack o' Lantern." Based on this myth, the Irish carved scary faces into turnips, beets and potatoes to scare away Stingy Jack or any other spirits of the night.

Source.