Qur'an
Surah 2 2:225
لَّا یُؤَاخِذُكُمُ ٱللَّهُ بِٱللَّغۡوِ فِیۤ أَیۡمَـٰنِكُمۡ وَلَـٰكِن یُؤَاخِذُكُم بِمَا كَسَبَتۡ قُلُوبُكُمۡۗ وَٱللَّهُ غَفُورٌ حَلِیمࣱ ۝٢٢٥
He will not call you to account for oaths you have uttered unintentionally, but He will call you to account for what you mean in your hearts. God is most forgiving and forbearing

The Prohibition of swearing to abandon a Good Deed
Allah commands, `You should not implement your vows in Allah's Name to refrain from pious acts and severing the relations with the relatives, if you swear to abandon such causes.' Allah said in another Ayah:
وَلاَ يَأْتَلِ أُوْلُواْ الْفَضْلِ مِنكُمْ وَالسَّعَةِ أَن يُؤْتُواْ أُوْلِى الْقُرْبَى وَالْمَسَـكِينَ وَالْمُهَـجِرِينَ فِى سَبِيلِ اللَّهِ وَلْيَعْفُواْ وَلْيَصْفَحُواْ أَلاَ تُحِبُّونَ أَن يَغْفِرَ اللَّهُ لَكُمْ
(And let not those among you who are blessed with graces and wealth swear not to give (any sort of help) to their kinsmen, Al-Masakin (the poor), and those who left their homes for Allah's cause. Let them pardon and forgive. Do you not love that Allah should forgive you) (24:22)
Continuity in a sinful vow is more sinful than breaking it by expiation. Allah's Messenger ﷺ said:
«وَاللهِ لَأَنْ يَلَجَّ أَحَدُكُمْ بِيَمِينِهِ فِي أَهْلِهِ آثَمُ لَهُ عِنْد اللهِ مِنْ أَنْ يُعْطِيَ كَفَّارَتَهُ الَّتِي افْتَرَضَ اللهُ عَلَيْه»
(By Allah! It is more sinful to Allah that one of you implements his vow regarding (severing the relations with) his relatives than (breaking his promise and) paying the Kaffarah that Allah has required in such cases.)
This is how Muslim reported this Hadith and also Imam Ahmad.
`Ali bin Abu Talhah reported that Ibn `Abbas said that what Allah said:
وَلاَ تَجْعَلُواْ اللَّهَ عُرْضَةً لاًّيْمَـنِكُمْ
(And make not Allah's (Name) an excuse in your oaths) means, "Do not vow to refrain from doing good works. (If you make such vow then) break it, pay the Kaffarah and do the good work." This was also said by Masruq, Ash-Sha`bi, Ibrahim An-Nakha`i, Mujahid, Tawus, Sa`id bin Jubayr, `Ata', `Ikrimah, Makhul, Az-Zuhri, Al-Hasan, Qatadah, Muqatil bin Hayyan, Ar-Rabi` bin Anas, Ad-Dahhak, `Ata' Al-Khurasani and As-Suddi.
Suporting this view, which is the majority view, is what is reported in the Two Sahihs that Abu Musa Al-Ash`ari narrated that Allah's Messenger ﷺ said: .
«إِنِّي وَاللهِ إِنْ شَاءَ اللهُ، لَا أَحْلِفُ عَلى يَمِينٍ فَأَرَى غَيْرَهَا خَيْرًا مِنْهَا إِلَّا أَتَيْتُ الَّذِي هُوَ خَيْرٌ وَتَحَلَّلْتُهَا»
(By Allah! Allah willing, I will not vow to do a thing and then see a better act, but I would do what is better and break my vow.) Muslim reported that Abu Hurayrah said that Allah's Messenger ﷺ said:
«مَنْ حَلَفَ عَلى يَمِينٍ فَرَأَى غَيْرَهَا خَيْرًا مِنْهَا فَلْيُكَفِّرْ عَنْ يَمِينِهِ، وَلْيَفْعَلِ الَّذِي هُوَ خَيْر»
(Whoever makes a vow and then finds what is better than his vow (should break his vow,) pay the Kaffarah and perform the better deed.)
The Laghw (Unintentional) Vows
Allah said:
لاَّ يُؤَاخِذُكُمُ اللَّهُ بِالَّلغْوِ فِى أَيْمَـنِكُمْ
(Allah will not call you to account for that which is unintentional in your oaths,)
This Ayah means, `Allah does not punish or hold you accountable for the Laghw (unintentional) vows that you make.' The Laghw vows are unintentional and are just like the habitual statements that the tongue repeats, without really intending them. For instance, it is reported in the Two Sahihs that Abu Hurayrah narrated that Allah's Messenger ﷺ said:
«مَنْ حَلَفَ فَقَالَ فِي حَلِفِهِ بِاللَّاتِ وَالْعُزَّى، فَلْيَقُلْ لَا إِلَهَ إِلَّا الله»
(Whoever swore and (unintentionally) mentioned Al-Lat and Al-`Uzza (two idols) in his vow, should then say, `There is no deity worthy of worship except Allah'.)
The Messenger said this statement to some new Muslims whose tongues were, before Islam, used to vowing by their idol Al-Lat. Therefore, the Prophet ordered them to intentionally recite the slogan of Ikhlas, just as they mentioned these words by mistake, so that it (the word of Ikhlas) may eradicate the word (of Shirk). This is why Allah said:
وَلَـكِن يُؤَاخِذُكُم بِمَا كَسَبَتْ قُلُوبُكُمْ
(...but He will call you to account for that which your hearts have earned.) and in another Ayah:
بِمَا عَقَّدتُّمُ الاٌّيْمَـنَ
(...for your deliberate oaths) (5:89)
Abu Dawud reported under Chapter: `The Laghw Vows' that `Ata' said that `A'ishah said that Allah's Messenger ﷺ said:
«اللَّغْوُ فِي الْيَمِينِ هُوَ كَلَامُ الرَّجُلِ فِي بَيْتِهِ: كَلَّا وَاللهِ، وَبَلَى وَالله»
(The Laghw in the vows includes what the man says in his house, such as, `No, by Allah,' and, `Yes, by Allah'.)
Ibn Abu Hatim reported that Ibn `Abbas said, "The Laghw vow includes vowing while angry."
He also reported that Ibn `Abbas said, "The Laghw vow includes vowing to prohibit what Allah has allowed, and this type does not require a Kaffarah (expiation)." Similar was said by Sa`id bin Jubayr.
In addition, Abu Dawud related under Chapter: `Vowing while Angry' that Sa`id bin Musayyib said that two Ansari brothers both received inheritance and one of them asked that the inheritance be divided. His brother said, "If you ask me about dividing the inheritance again, then all of what I have will be spent on the Ka`bah's door." `Umar said to him, "The Ka`bah does not need your money. So break your vow, pay the Kaffarah and come to terms with your brother. I heard Allah's Messenger ﷺ saying:
«لَا يَمِينَ عَلَيْكَ وَلَا نَذْرَ فِي مَعْصِيَةِ الرَّبِّ عَزَّ وَجَلَّ، وَفِي قَطِيعَةِ الرَّحِمِ، وَفِيمَا لَا تَمْلِك»
(Do not make a vow against yourself, nor to disobey the Lord, cut the relations of the womb or dispose of what you do not own.)"
Allah said:
وَلَـكِن يُؤَاخِذُكُم بِمَا كَسَبَتْ قُلُوبُكُمْ
(. ..but He will call you to account for that which your hearts have earned,)
Ibn `Abbas, Mujahid and several others said that this Ayah means swearing about a matter while knowing that he is lying. Mujahid and others said this Ayah is similar to what Allah said:
وَلَـكِن يُؤَاخِذُكُم بِمَا عَقَّدتُّمُ الاٌّيْمَـنَ
(...but He will punish you for your deliberate oaths.) (5:89) Allah said (2:225 above):
وَاللَّهُ غَفُورٌ حَلِيمٌ
(And Allah is Oft-Forgiving, Most-Forbearing.) meaning, He is Oft-Forgiving to His servants and Most Forbearing with them.

(Allah will not take you to task for that which is unintentional in your oaths) by imposing amends for unintentional oaths such as saying: �No, by Allah� or �Yes indeed, by Allah� upon buying and selling and upon other instances of idle talk. (But He will take you to task for that which your hearts have garnered) what is hidden in your hearts. (And Allah is Forgiving) of your unintentional oaths, (Clement) in that He does not hasten punishment upon you; it is also said: idle talk is an oath for committing transgression. If one refrains from it and makes amends, then Allah does not take one to task for it; but if one does not refrain from so doing, then Allah will take one to task for it.

EN

God will not take you to task for a slip that results in your oaths which is what the tongue utters spontaneously and unintentionally such as ‘By God’ ‘Indeed by God’ in such instances there is no sin and no redemption required; but He will take you to task for what your hearts have earned what their intention is when you commit perjury in your oaths; and God is Forgiving of slips in your oaths Forbearing since He delays the punishment of the one deserving it.

EN

Note:
The laghw لغو or ineffectual oath has two meanings:
I. In the first case it means a false oath sworn without volition over something in the past, or it could have been sworn with volition while the oath-taker considers it to be true in his supposition. For ex-ample, guided by his information and supposition, one ends up declaring on oath that a certain person has arrived while that person had not arrived in reality. Similarly, if someone swears on oath for some-thing in future unintentionally, while he has been actually wanting to say something else, but the words of oath come out of his lips mistakenly, this type of oath also falls in this category. All these three types are not an act of sin and that is why they are called laghw لغو or ineffectual. This act will not be reprehensible in the Hereafter (Akhirah). As compared to this, the oath which has been declared reprehensible is the one that has been uttered intentionally knowing it to be false. This is known as ghamus (perjury), and is an act of sin, but according to the Hanafiyyah, it does not require kaffarah or expiation. Therefore, لغو laghw, in the sense explained earlier, involves no kaffarah more obviously, (because it is not a sinful act). The verse under discussion exclusively takes up these two categories that carry no کَفَّارہ kaffarah.
II. Laghw لغو also means that which has no kaffarah کَفَّارہ . It will be called as laghw because it does not entail the liability of Kaffarah کَفَّارہ in this world.
III. Given this meaning, the word, laghw لغو is inclusive of ghamus, which being an act of sin, however, does not require kaffarah کَفَّارہ .
As compared to this, the oath that requires kaffarah کَفَّارہ is called mun'aqidah منعقدہ (that which is established, confirmed: fait accompli). For instance, if someone intentionally declares on oath to the effect that he or she would or would not perform a certain act, then, acting contrarily requires kaffarah. (Bayan al-Qur'an)

EN

Swayed by anger and obstinacy, sometimes an individual swears an oath that he will not do anything which would benefit a certain person. In ancient times, a variety of such oaths was very common among the Arabs. They swore oaths that they would refrain from such and such a good deed, so that when they were called upon to join in some good act, they would decline, saying that they had already taken an oath to the contrary. To refrain from good acts is in itself bad enough, but swearing to this in the name of God is much worse. For God is a being who is all merciful and all good. Then attaching the name of God to the non-performance of good works is sinful. Perversion at all events is bad. But if perverse acts are done in the name of God, there is a manifold increase in the evil perpetuated.