Other forms: letting the cat out of the bag; lets the cat out of the bag
If you let the cat out of the bag, you reveal a secret, probably one that you promised to keep to yourself.
If you promise not to reveal your friend's secret crush but then find yourself telling everyone in your math class about it, you've let the cat out of the bag. Like so many idioms, no one is positive where this saying originated, but one good guess is that it came from the old trick of substituting a cat for a piglet at a meat market. When the cat came out of the bag, the fraud would be revealed.