"He who diligently seeks good seeks favor, but he who seeks evil, evil will come to him"
If you go looking for evil, then it will come upon you. This is the message but there is a deeper more subtle meaning. If you keep allowing yourself to be tempted by that which is outside of the moral box of God, then all kinds of evil that you cannot imagine will attach to you and come upon you. You will get far more than you can possibly imagine. The definition of evil in the Scripture is much different than our definition of evil. We seem to understand by evil that which is violent, radically deceptive, and morally reprehensible. God, however, sees evil as anything outside His Ten Commandments box which prescribes the boundaries of loving God and loving others. When we pass His moral boundaries, then we are pursuing evil and doing it. There are far more consequences than we can possibly imagine.
The opposite of seeking evil is diligently seeking good – that which is morally good. This is the heart of the first and second great commandments: You shall love the Lord your God with all your heart, and with all your soul, and with all your mind. You shall love your neighbor as yourself.
When you seek what is good, you seek the delight of God. To be delighted with God and to delight God is the highest moral good. This type of activity is the way to beat back the pull of temptation. If you are seeking the good, you are not and cannot be seeking evil. While it does not say it in this proverb, the consequences of seeking the good is also far more than one can envision when the pursuit began.