The Bavli in several places discusses the concept and application of ein shaliach l’dvar aveirah – there is no agency for a sinful matter. The Gemara in Kiddushin 42b explains it on the basis of a sevarah, a logical inference: divrei ha’rav v’divrei ha’talmid divrei me shom’im – if the directive of the master (the Torah, that forbade this act) and the directive of the student (the individual attempting to enlist the agent to perform the act) clash, whom should the prospective agent heed? Clearly he should heed the directive of the master! The Gemara there notes two exceptions to that rule (שליחות יד and מעילה). However, based on the principle that when two pesukim in different topics teach the same law, that law is only applicable to those two topics (שני כתובים הבאים כאחד אין מלמדין), we draw no inference from them to any other cases. The Gemara in Bava Metzia 10b gives examples in which divrei ha’rav v’divrei ha’talmid would not apply, in which cases we would therefore say that there could be agency for a sinful matter.
The Yerushalmi, howver, in Kesuvos 17b actually derives ein shaliach l’dvar aveirah from a pasuk. The pasuk appears Vayikra 17:4 and states that when a person brings a korban outside the Beis HaMikdash, דם יחשב לאיש ההוא, it is not a valid offering, and it is considered as if he spilled the blood of the offering for naught, and he is liable to kareis. The Yerushalmi here focuses on the two words la’ish ha’hu – to that man, and not to those on whose half he acted as an agent in bringing the korban in the wrong place. On the basis of this derivation, the Yerushalmi rules that if Reuven directed Shimon to muzzle an ox while it was threshing, it is Shimon the shaliach, not Reuven the meshalei’ach, who transgresses and is liable for the sin of Lo Sachsom. There are many potential ramifications that may emerge from this little known and little mentioned Yerushalmi that derives ein shaliach l’dvar aveirah from Scripture, as opposed to from logical inference!