Sunan an-Nasa'i, Book 35, Hadith 46 (In-Book)

It was narrated from 'Aishah that the Messenger of Allah said: "Whoever vows to obey Allah, let him obey Him, and whoever vows to disobey Allah, let him not disobey Him."

أَخْبَرَنَا قُتَيْبَةُ، عَنْ مَالِكٍ، عَنْ طَلْحَةَ بْنِ عَبْدِ الْمَلِكِ، عَنِ الْقَاسِمِ، عَنْ عَائِشَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ مَنْ نَذَرَ أَنْ يُطِيعَ اللَّهَ فَلْيُطِعْهُ وَمَنْ نَذَرَ أَنْ يَعْصِيَ اللَّهَ فَلاَ يَعْصِهِ ‏" ‏ ‏.‏

sunnah.com