Sahih Muslim 1641 a
Imran b. Husain reported that the tribe of Thaqif was the ally of Banu 'Uqail. Thaqif took two persons from amongst the Companions of Allah's Messenger (ﷺ) as prisoners. The Companions of Allah's Messenger (ﷺ) took one person at Banu Uqail as prisoner, and captured al-'Adbi (the she-camel of the Holy Prophet) along with him. Allah's Messenger (ﷺ) came to him and he was tied with ropes. He said:
Muhammad. He came near him and said: What is the matter with you? Thereupon he (the prisoner) said: Why have you taken me as prisoner and why have you caught hold of one proceeding the pilgrims (the she-camel as she carried the Prophet on her back and walked ahead of the multitude)? He (the Holy Prophet) said: (Yours is a great fault). I (my men) have caught hold of you for the crime of your allies, Banu Thaqif. He (the Holy Prophet) then turned away. He again called him and said: Muhammad, Muhammad, and since Allah's Messenger (ﷺ) was very compassionate, and tenderhearted, he returned to him, and said: What is the matter with you? He said: I am a Muslim, whereupon he (the Holy Prophet) said: Had you said this when you had been the master of yourself, you would have gained every success. He then turned away. He (the prisoner) called him again saying: Muhammad, Muhammad. He came to him and said: What is the matter with you? He said: I am hungry, feed me, and I am thirsty, so provide me with drink. He (the Holy Prophet) said: That is (to satisfy) your want. He was then ransomed for two persons (who had been taken prisoner by Thaqif). He (the narrator) said: A woman of the Ansar had been taken prisoner and also al-Adbi' was caught. The woman had been tied with ropes. The people were giving rest to their animals before their houses. She escaped one night from the bondage and came to the camels. As she drew near the camels, they fretted and fumed and so she left them until she came to al-, Adbi'. It did not fret and fume; it was docile She rode upon its back and drove it away and she went off. When they (the enemies of Islam) were warned of this, they went in search of it, but it (the she-camel) exhausted them. She (the woman) took vow for Allah, that in case He would save her through it, she would offer that as a sacrifice. As she reached Medina, the people saw her and they said: Here is al-Adbi, the she-camel of Allah's Messenger (ﷺ). She (the woman) said that she had taken a vow that if Allah would save her on its back, she would sacrifice it. They (the Prophet's Companions) came to Allah's Messenger (ﷺ) and made a mention of that to him, whereupon he said: Hallowed be Allah, how ill she rewarded it that she took vow to Allah that if He saves her on its back, she would sacrifice it! There is no fulfillment of the vow in an act of disobedience, nor in an act over which a person has no control. In the version of Ibn Hujr (the words are):" There is no vow in disobedience to Allah."
وَحَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، وَعَلِيُّ بْنُ حُجْرٍ السَّعْدِيُّ، - وَاللَّفْظُ لِزُهَيْرٍ - قَالاَ حَدَّثَنَا إِسْمَاعِيلُ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا أَيُّوبُ، عَنْ أَبِي قِلاَبَةَ، عَنْ أَبِي الْمُهَلَّبِ، عَنْ عِمْرَانَ بْنِ حُصَيْنٍ، قَالَ كَانَتْ ثَقِيفُ حُلَفَاءَ لِبَنِي عُقَيْلٍ فَأَسَرَتْ ثَقِيفُ رَجُلَيْنِ مِنْ أَصْحَابِ رَسُولِ اللَّهِ صلى الله عليه وسلم وَأَسَرَ أَصْحَابُ رَسُولِ اللَّهِ صلى الله عليه وسلم رَجُلاً مِنْ بَنِي عُقَيْلٍ وَأَصَابُوا مَعَهُ الْعَضْبَاءَ فَأَتَى عَلَيْهِ رَسُولُ اللَّهِ صلى الله عليه وسلم وَهْوَ فِي الْوَثَاقِ قَالَ يَا مُحَمَّدُ ‏.‏ فَأَتَاهُ فَقَالَ ‏"‏ مَا شَأْنُكَ ‏"‏ ‏.‏ فَقَالَ بِمَ أَخَذْتَنِي وَبِمَ أَخَذْتَ سَابِقَةَ الْحَاجِّ فَقَالَ إِعْظَامًا لِذَلِكَ ‏"‏ أَخَذْتُكَ بِجَرِيرَةِ حُلَفَائِكَ ثَقِيفَ ‏"‏ ‏.‏ ثُمَّ انْصَرَفَ عَنْهُ فَنَادَاهُ فَقَالَ يَا مُحَمَّدُ يَا مُحَمَّدُ ‏.‏ وَكَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم رَحِيمًا رَقِيقًا فَرَجَعَ إِلَيْهِ فَقَالَ ‏"‏ مَا شَأْنُكَ ‏"‏ ‏.‏ قَالَ إِنِّي مُسْلِمٌ ‏.‏ قَالَ ‏"‏ لَوْ قُلْتَهَا وَأَنْتَ تَمْلِكُ أَمْرَكَ أَفْلَحْتَ كُلَّ الْفَلاَحِ ‏"‏ ‏.‏ ثُمَّ انْصَرَفَ فَنَادَاهُ فَقَالَ يَا مُحَمَّدُ يَا مُحَمَّدُ ‏.‏ فَأَتَاهُ فَقَالَ ‏"‏ مَا شَأْنُكَ ‏"‏ ‏.‏ قَالَ إِنِّي جَائِعٌ فَأَطْعِمْنِي وَظَمْآنُ فَأَسْقِنِي ‏.‏ قَالَ ‏"‏ هَذِهِ حَاجَتُكَ ‏"‏ ‏.‏ فَفُدِيَ بِالرَّجُلَيْنِ - قَالَ - وَأُسِرَتِ امْرَأَةٌ مِنَ الأَنْصَارِ وَأُصِيبَتِ الْعَضْبَاءُ فَكَانَتِ الْمَرْأَةُ فِي الْوَثَاقِ وَكَانَ الْقَوْمُ يُرِيحُونَ نَعَمَهُمْ بَيْنَ يَدَىْ بُيُوتِهِمْ فَانْفَلَتَتْ ذَاتَ لَيْلَةٍ مِنَ الْوَثَاقِ فَأَتَتِ الإِبِلَ فَجَعَلَتْ إِذَا دَنَتْ مِنَ الْبَعِيرِ رَغَا فَتَتْرُكُهُ حَتَّى تَنْتَهِيَ إِلَى الْعَضْبَاءِ فَلَمْ تَرْغُ قَالَ وَنَاقَةٌ مُنَوَّقَةٌ فَقَعَدَتْ فِي عَجُزِهَا ثُمَّ زَجَرَتْهَا فَانْطَلَقَتْ وَنَذِرُوا بِهَا فَطَلَبُوهَا فَأَعْجَزَتْهُمْ - قَالَ - وَنَذَرَتْ لِلَّهِ إِنْ نَجَّاهَا اللَّهُ عَلَيْهَا لَتَنْحَرَنَّهَا فَلَمَّا قَدِمَتِ الْمَدِينَةَ رَآهَا النَّاسُ ‏.‏ فَقَالُوا الْعَضْبَاءُ نَاقَةُ رَسُولِ اللَّهِ صلى الله عليه وسلم ‏.‏ فَقَالَتْ إِنَّهَا نَذَرَتْ إِنْ نَجَّاهَا اللَّهُ عَلَيْهَا لَتَنْحَرَنَّهَا ‏.‏ فَأَتَوْا رَسُولَ اللَّهِ صلى الله عليه وسلم فَذَكَرُوا ذَلِكَ لَهُ ‏.‏ فَقَالَ ‏"‏ سُبْحَانَ اللَّهِ بِئْسَمَا جَزَتْهَا نَذَرَتْ لِلَّهِ إِنْ نَجَّاهَا اللَّهُ عَلَيْهَا لَتَنْحَرَنَّهَا لاَ وَفَاءَ لِنَذْرٍ فِي مَعْصِيَةٍ وَلاَ فِيمَا لاَ يَمْلِكُ الْعَبْدُ ‏"‏ ‏.‏ وَفِي رِوَايَةِ ابْنِ حُجْرٍ ‏"‏ لاَ نَذْرَ فِي مَعْصِيَةِ اللَّهِ ‏"‏ ‏.‏