Question: "What did Jesus mean when He said to 'not cast your pearls before swine' (Matthew 7:6)?"
Answer: "Do not cast your pearls before swine" is a portion of the Sermon on the Mount, and to understand its meaning, we have to understand its context and placement within the sermon. Christ had just finished instructing the crowd on judgment and reproof: “Do not judge, or you too will be judged. For in the same way you judge others, you will be judged, and with the measure you use, it will be measured to you” (Matthew 7:1-2), and “You hypocrite, first take the plank out of your own eye, and then you will see clearly to remove the speck from your brother's eye” (Matthew 7:5). Then in verse 6, Christ tempers these admonitions and shows us the difference between “judgment” and “discernment.”
The analogy of the dogs actually comes from Proverbs: “As a dog returns to its vomit, so a fool repeats his folly” (Proverbs 26:11). Swine are also described in this way, as illustrated by Peter: “Of them [false prophets and teachers] the proverbs are true: ‘A dog returns to its vomit,’ and, ‘A sow that is washed goes back to her wallowing in the mud’” (2 Peter 2:22). The dogs and swine here are representative of those who would ridicule, reject, and blaspheme the gospel once it has been given to them. We are not to put forth the gospel of Jesus Christ in the direction of someone who has no other purpose than to trample it and return to his own evil ways. We identify such people through discernment, which is given in some measure to all Christians (1 Corinthians 2:15-16).
This does not mean we refrain from preaching the gospel. Jesus Himself ate with and taught sinners and tax collectors (Matthew 9:10). In essence, the instruction in Matthew 7:6 is the same that Jesus gave to His apostles when He said, “If anyone will not welcome you or listen to your words, shake the dust off your feet when you leave that home or town” (Matthew 10:14). We are not to judge others, for we are guilty of the same things they are. Reserving judgment, however, does not prevent us from discerning those who would accept, or at least respect, the gospel from those who would ridicule, mock, and trample it, and then turn on us and abuse us. Balancing judgment with discernment is the wisdom of serpents Jesus refers to in Matthew 10:16.