Aisha reported: The Prophet, peace and blessings be upon him, said, “Whoever vows to obey Allah, let him obey Him. Whoever vows to disobey Allah, he must not disobey Him.”
Source: Ṣaḥīḥ al-Bukhārī 6700
Grade: Sahih (authentic) according to Al-Bukhari
Ibn Taymiyyah said, “If a person makes a vow in obedience to Allah, he must fulfill it. If he makes a vow in disobedience to Allah, he must not fulfill it, as what is forbidden is not permissible to fulfill. But if he cannot fulfill his lawful vow, he must perform the expiation for breaking his oath, according to the majority of the predecessors.”
Source: Majmū’ al-Fatāwá 33/49
عَنْ عَائِشَةَ قَالَتْ قَالَ النَّبِيُّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ مَنْ نَذَرَ أَنْ يُطِيعَ اللَّهَ فَلْيُطِعْهُ وَمَنْ نَذَرَ أَنْ يَعْصِيَهُ فَلاَ يَعْصِهِ
6700 صحيح البخاري كتاب الأيمان والنذور باب النذر فيما لا يملك وفي معصية
قال ابن تيمية فَإِذَا كَانَ قَصْدُ الْإِنْسَانِ أَنْ يُنْذِرَ لِلَّهِ طَاعَةً فَعَلَيْهِ الْوَفَاءُ بِهِ وَإِنْ نَذَرَ مَا لَيْسَ بِطَاعَةِ لَمْ يَكُنْ عَلَيْهِ الْوَفَاءُ بِهِ وَمَا كَانَ مُحَرَّمًا لَا يَجُوزُ الْوَفَاءُ بِهِ لَكِنْ إذَا لَمْ يُوفِ بِالنَّذْرِ لِلَّهِ فَعَلَيْهِ كَفَّارَةُ يَمِينٍ عِنْدَ أَكْثَرِ السَّلَفِ
33/49 مجموع الفتاوى كتاب الطلاق القصد في المعقود لله