In the Tang Dynasty (618-907), a terribly greedy county magistrate named Wang Lu took many bribes and practiced graft. A large number of his subordinates also learned from him, arousing the discontent of the common people.
One day, someone sent him a petition accusing his secretary of practicing graft and taking bribes. The magistrate trembled when he read the petition, thinking, “Isn’t it accusing me? Aren’t the crimes those which I have committed? How do they know?”
Wang Lu was so frightened that he forgot his proper role in handling the case. Instead of issuing a judgment, he couldn’t help writing these words concerning the petition: “By beating the grass, you have startled me, as I am like a snake under the grass!”
The idiom comes from Despicable Things of the Southern Tang State. Its original meaning is that punishment can serve as a warning to others or that the frustration of one person arouses another person’s fear. But people now use the idiom to indicate that imprudent and imprecise actions startle the adversary.