Many people use the phrase “let the cat out of the bag” to refer to divulging a secret, but they are often unaware of the colorful history behind the term. As is the case with many idioms, the origins of the phrase are actually rather interesting, and they provide an intriguing insight into the lives of historical people. Delving into the origins of such terms can sometimes lead the researcher along fascinating tangents, as well.
In order to understand the origins of "let the cat out of the bag," it helps to understand how medieval markets worked. During the Middle Ages, markets or fairs were held to sell livestock, produce, and other goods from around a region. Most of the livestock was sold alive, usually in sacks so that the purchaser could bring it home relatively neatly. As a general rule, someone would inspect the pigs, chickens, and so forth for sale and pick one out, and then the farmer would bag the animal so that it could be carried.
Unscrupulous merchants might replace the livestock with a cat, since cats were readily available. The unknowing customer would carry the bag home, open it, and realize that he or she had been swindled. However, the plot relied on not letting the cat out of the bag too early. If the bag was opened in the marketplace, the customer could demand reparations from the merchant, since the secret would be out. Of course, the scheme would also rely on a quiet cat, since most people know the difference between an oink and a meow.
Some people have claimed that the term is related to the cat-o-nine tails famously used in naval discipline. However, this link seems tenuous at best, since there is no clear connection between letting the cat out of the bag and nautical punishments. Removing a whip from a bag is clearly not a euphemism for revealing a secret or spoiling a scam.
Incidentally, this practice is also related to the common term “pig in a poke.” A “poke” is a bag in some dialects, and a pig in a poke is, therefore, a pig in a bag or sack. The full idiom is usually “don't buy a pig in a poke,” meaning that buyers should inspect goods before purchasing them and taking them home. Otherwise, they may let the cat out of the bag too late, resulting in a rather large disappointment.