If you live by the spirit of the precepts,
you will never go wrong.
If you stick to the letter of the precepts,
you might sometimes do wrong.
The Maha-Maya Sutra recounts the tale of Malika, the wife of King Prasenajit, who lies, seductively adorns her body, entertains, and serves wine to the king… When the Buddha was in the world, King Prasenajit’s Queen had received the eight precepts of a layperson. One time, King Prasenajit wanted to kill his cook. When his Queen heard about this she wanted to save the cook, so she bedecked herself in fine adornments, put on fragrant powders, placed flowers in her hair, and prepared delicious food and wine. Then she took along several ladies-in-waiting and went to see the King. King Prasenajit was extremely pleased with the wine and the food, and afterwards the Queen beseeched the King to forgo his idea of killing the cook. The King consented, and so in this way the cook was saved.
The next day, the Queen went to the Buddha’s place and repented. She had already taken the eight lay precepts, and one of them is that one can’t put fragrant oils or perfumes on one’s body or flowers in one’s hair. She had also drunk wine the previous day…But since the only reason she did all that was because she wanted to save the cook’s life, the Buddha said, ‘Not only have you not transgressed the precepts, you actually have gained merit and virtue’
Because her motives were wholesome and pure, the Buddha praises her actions. Chan-jan notes: This story tells of breaking the precepts to save beings because of the Bodhisattva’s basic desire to benefit others. As such, it is known as ‘good in the midst of evil’… Anyone wishing to follow this example must assess his or her motives judiciously. If one is just indulging desire, it is not on the order of observance of the precepts.
Thus Have I Heard: Buddhist Parables & Stories