Whoever takes an oath to do something and then he finds a better alternative which brings him closer to Allah should do what is better in piety
عن أبي طَرِيف عدي بن حاتم رضي الله عنه مرفوعاً: «مَن حَلَف على يَمِين ثم رأى أَتقَى لله مِنها فَلْيَأت التَّقوَى».
Abu Tarīf ‘Adiyy ibn Hātim (may Allah be pleased with him) reported that the Prophet (may Allah’s peace and blessings be upon him) said: "Whoever takes an oath to do something and then he finds a better alternative which brings him closer to Allah should do what is better in piety."
Narrated by MuslimGradeAuthentic hadith
Explanation
The Hadīth states that anyone takes an oath to do or not to do something, and then he sees that doing something else is better and more pleasing to Allah than abiding by the oath, then he is recommended to break the oath and do what is better. If the oath is related to something that is obligatory to be done or to be abandoned, such as swearing to abandon the prayer or to drink wine; in this case, he must break his oath and do what is more pleasing to Allah. In other words, he must do what is obligatory and abandon what is forbidden.
Reference
بهجة الناظرين شرح رياض الصالحين لسليم الهلالي، ط1، دار ابن الجوزي، الدمام، 1415هـ.
دليل الفالحين لطرق رياض الصالحين، لابن علان، نشر دار الكتاب العربي.
رياض الصالحين للنووي، ط1، تحقيق: ماهر ياسين الفحل، دار ابن كثير، دمشق، بيروت، 1428هـ.
شرح رياض الصالحين للشيخ ابن عثيمين، دار الوطن للنشر، الرياض، 1426هـ.
صحيح مسلم، تحقيق: محمد فؤاد عبد الباقي، دار إحياء التراث العربي، بيروت.
نزهة المتقين شرح رياض الصالحين لمجموعة من الباحثين، ط14، مؤسسة الرسالة، 1407هـ.
Every ḥadīth, grade, explanation and benefit here is shown exactly as HadeethEnc.com publishes it, under its terms for republication. The grade names no grader. The translations and explanations are its authors’ own, and some state rulings; Sabīl’s reviewers have not examined them. The Arabic ḥadīth is the text. Source: HadeethEnc.com