This expression is usually expressed in the negative proverbial form – ‘don’t cast your pearls before swine’, and is found in the Bible, Matthew 7:6, first appearing in English bibles in Tyndale’s Bible, 1526:
Nether caste ye youre pearles before swyne.
It had existed in the language for some time before that, in various forms. It may have migrated from France, as it is found in a Middle French text from 1402 as ‘jeter des perles aux pourceaux’. It is also found in Middle English, in Langland’s The vision of William concerning Piers Plowman, which is of uncertain date, but appeared around the same time:
Nolite mittere, Man, margerie perlis Among hogges…
The biblical text is generally interpreted to be a warning by Jesus to his followers that they should not offer biblical doctrine to those who were unable to value and appreciate it.
See other ‘Don’t…’ proverbs:
Don’t change horses in midstream
Don’t count your chickens before they are hatched
Don’t get mad, get even
Don’t cut off your nose to spite your face
Don’t keep a dog and bark yourself
Don’t let the bastards grind you down
Don’t let the cat out of the bag
Don’t look a gift horse in the mouth
Don’t put the cart before the horse
Don’t shut the stable door after the horse has bolted
Don’t throw good money after bad
Don’t throw the baby out with the bathwater
Don’t try to teach your Grandma to suck eggs
Don’t upset the apple-cart