Let's say that someone swears an oath to commit a sin. What would be worse? Carrying out that oath or Breaking that oath.
If You make an oath for a wrong deed it is not an oath. You do not have to fulfill that oath. But if you make an oath for good deed then you must have to fulfill it. If you want to break that for a valid reason then you will have to give an atonement." first is to feed 10 poor persons, If you can't do this give clothing to 10 poor persons, or free a slave. If you are unable to do anything out of this three, fast for three days. Note that Anyone can only make an oath in the name of Allah,You cannot take Allah name for any wrong deed.In surah maidah versus 89, Allah says that ["Allah will not call you to account for what is futile in your oaths, but He will call you to account for your deliberate oaths: for expiation feed ten indigent persons on a scale of the average for the food of your families; or clothe them; or give a slave his freedom. If that is beyond your means, fast for three days. That is the expiation for the oaths ye have sworn. But keep to your oaths. Thus doth Allah make clear to you His Signs that ye may be grateful.] Wallah Aulam( Allah Knows Best)