What does "when pigs fly" mean — and why is it funny?

informal, humorous

Meaning

Never. A sarcastic way to say that something will not happen.

Where it comes from

The flying pig has been a symbol of impossibility for centuries; a Scottish proverb about pigs flying appears in the 1600s, and pairing pigs with flight stayed a stock image of the absurd ever since.

Why it is funny

The comedy is the vivid impossibility. Instead of flatly saying 'never', the phrase conjures a fat, ungainly pig flapping hopelessly through the sky. It answers a request with a cartoon, and the more earnest the request, the funnier the picture.

Used in a sentence

"Sure, I'll go skydiving with you — when pigs fly."