Question:
What is the ruling on swearing an oath to do something impermissible, and what is the ruling on fulfilling it?
Answer:
Swearing an oath to do something impermissible is itself impermissible. However, if one has sworn such an oath, then breaking it is obligatory, and in the case of breaking it, one must also pay the expiation.
❀ Sayyiduna Abd al-Rahman bin Samurah (may Allah be pleased with him) narrates that the Messenger of Allah ﷺ said:
إذا حلفت على يمين ورأيت غيرها خيرا منها فأت الذى هو خير وكفر عن يمينك.
“When you swear an oath to do something, then you see another thing better than it, do the better thing and pay the expiation for your oath.”
When an oath has been sworn to do a permissible thing, and it later becomes known that the other course is better, one should break the oath and do the other thing. So, for an oath that was sworn on an impermissible act, changing it is not only correct but also obligatory.