Question
What if my intention in doing something was sound, but the outcome was haram? Is the sin of that action on me? For example, if I gave someone an animal that I owned, and told him to take care of it, then after that I found out that he had mistreated the animal, have I sinned because of that?
Answer
Praise be to Allah.
If you gave an animal to someone else and told him to take care of it, but he mistreated it, there is no sin on you for that, unless you knew that he mistreats animals and you thought it most likely that he would not follow your instructions. In that case you would have sinned, because doing that would be helping and enabling him to do something that is haram. If you are able to take the animal back and save it from harm, then you must do that.
If a person’s intention is sound and he does something permissible, then the basic principle is that he is not sinning, even if that results in something haram, unless he knew or thought it most likely that it would result in the other person doing something haram, in which case he has no right to help him in that. The jurists likened that to selling grapes to someone who you know will use them to make wine, or selling a weapon to someone who you know will use it for unlawful purposes. Selling is permissible in principle, but if it is known or thought most likely that the purchaser will use the item to commit a haram action, it is not permissible to sell it to him.
They said something similar regarding lending. So it is not permissible to lend something to someone who is going to use it for haram purposes, such as lending a vessel to someone who will drink wine from it, or lending a knife to someone who will slaughter a pig with it, or renting an apartment to someone who will commit haram actions in it.
In this case, thinking that something is most likely to be the case is the same as knowing, so if you think it most likely that an action will result in something that is haram, it is not permissible to do it.
See: al-Mughni (5/131), Haashiyat ad-Dasuqi (3/435), and Matalib Uli’n-Nuha (3/726).
To sum up, it is not permissible to do a haram action, or to do that which you think most likely will result in something haram, even if it is done by someone else.
And Allah knows best.