Two stories compete for this phrase. The first is that dishonest market sellers put a cat in a sack and sold it as a piglet, so that opening the bag exposed the fraud. The second, much less often told, is that the "cat" is the cat-o'-nine-tails kept in a bag aboard ship.
Phrase Finder calls the market explanation the more plausible of the two, and then says, in its own words, that it can find no direct documentary evidence linking the phrase to the selling of livestock. That combination is the whole story of this page, and it is a distinction worth learning to hold, because it is the one the tracing method behind these pages turns on more often than any other. A theory can be the best available and still be unproven, and a page that collapses those two states into one is doing the reader a disservice.
The citation trail
Phrase Finder gives the first known printed use as a 1760 edition of The London Magazine, in the line: "We could have wished that the author had not let the cat out of the bag."
Notice what that citation shows and what it does not. It shows the phrase in fully figurative use, meaning to reveal a secret, in 1760. It shows nothing whatsoever about where the image came from. An earliest citation dates a phrase; it does not explain it, and a great deal of confusion in this niche comes from treating the two as the same job.

Why the market story is the better theory
The pig-in-a-poke connection is not arbitrary. English already carries a separate, older idiom about the same alleged fraud: buying a pig in a poke means buying something sight unseen, a "poke" being a bag. Two idioms describing the two halves of one transaction is a suggestive pattern.
Phrase Finder adds a second reason. Parallel expressions exist in Dutch and in German that translate as buying false goods in a bag, which points to a practice, or at least a story about a practice, that was current across European markets rather than local to England. We report those parallels as Phrase Finder reports them. We did not open a Dutch or German dictionary to confirm the wording.

Why it is still not proven
What is missing is the link, and it is missing in a specific way that is worth naming.
There are records of the pig-in-a-poke idiom. There are records of the cat-out-of-the-bag idiom. There is no text anyone has produced in which someone describes the fraud and uses the phrase, and without that, the connection between the two idioms is an inference drawn by later readers who noticed that they fit together.
Idioms that fit together are not always related. English is full of phrases involving bags, cats and markets, and any two of them can be made to look like a pair by someone who wants a story. The honest position is the one Phrase Finder takes: this is where the evidence points, and the evidence does not arrive.

The naval theory, and why it is weaker
The cat-o'-nine-tails version has the shape of a classic sailor etymology, and sailor etymologies are the single most over-represented category of false origin story in English. The whip was real and was kept in a bag. That is the entire case.
Against it: the 1760 citation is a literary review, not a naval document, and the sense in that citation is disclosure of a secret rather than the beginning of a punishment. Nothing rules the naval story out, and nothing supports it beyond the coincidence of the word "cat."
This is the same structure as the buried-alive story attached to "sleep tight" and the theories collected around "the whole nine yards": a real object exists, the phrase mentions something that sounds like it, and the connection is supplied by the reader rather than by any source.

How to hold an answer like this
Readers dislike a qualified answer, and pages that give one lose to pages that do not. It is still the right answer here, and there is a way to carry it that is neither a shrug nor a false confidence.
The market explanation is the leading theory, held by the reference that has looked hardest at it, and it is not documented. You can repeat it. What you should not do is repeat it as a fact, because the moment you drop the qualification, you have joined the chain of pages that turned a plausible idea into an established one by nothing more than repetition.

Register and region
| Register | Region | Status | |
|---|---|---|---|
| let the cat out of the bag | neutral. Fine in speech, in journalism and in most business writing | both US and UK | current |
| a pig in a poke | neutral, and noticeably less common than it was | both US and UK, slightly more familiar in UK usage | dated but understood |

What is genuinely unresolved
The origin is not settled. The market theory is the leading one and Phrase Finder states plainly that it cannot document the link.
The Dutch and German parallels are reported at second hand. We did not confirm the wording in a native reference.
Whether the pig-in-a-poke fraud was widespread or was itself a folk tale is not established here. That question sits underneath the whole theory, and no reference we read settles it.




