Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:20110Abū ʿAbdullāh al-Ḥāfiẓ > Abū ʿAmr ʿUthmān b. Aḥmad b. al-Sammāk > Yaḥyá b. Abū Ṭālib > Ḥammād b. Masʿadah > Ḥumayd > Thābit > Anas

[Machine] That the Prophet ﷺ saw a man being whipped between two men, so he said, "What is wrong with him?" They said, "He made a vow to walk to the Ka'bah." He said, "Surely Allah is rich and does not need to punish himself, so tell him to ride."  

البيهقي:٢٠١١٠أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ أنبأ أَبُو عَمْرٍو عُثْمَانُ بْنُ أَحْمَدَ بْنِ السَّمَّاكِ ثنا يَحْيَى بْنُ أَبِي طَالِبٍ ثنا حَمَّادُ بْنُ مَسْعَدَةَ ثنا حُمَيْدٌ عَنْ ثَابِتٍ عَنْ أَنَسٍ

أَنَّ النَّبِيَّ ﷺ رَأَى رَجُلًا يُهَادَى بَيْنَ رَجُلَيْنِ فَقَالَ مَا لَهُ؟ فَقَالُوا نَذَرَ أَنْ يَمْشِيَ إِلَى الْبَيْتِ قَالَ فَإِنَّ اللهَ ﷻ غَنِيٌّ عَنْ تَعْذِيبِ هَذَا نَفْسَهُ فَمُرُوهُ فَلْيَرْكَبْ  

أَخْرَجَهُ الْبُخَارِيُّ وَمُسْلِمٌ فِي الصَّحِيحِ مِنْ حَدِيثِ مَرْوَانَ الْفَزَارِيِّ وَغَيْرِهِ عَنْ حُمَيْدٍ

See similar narrations below:

Collected by Nasāʾī
nasai:3852Isḥāq b. Ibrāhīm > Ḥammād b. Masʿadah > Ḥumayd > Thābit > Anas

"The Prophet saw a man being supported by two others and said: 'What is this?' They said: 'He vowed to walk to the House of Allah.' He said: 'Allah has no need for this man to torture himself. Tell him to ride.'"  

النسائي:٣٨٥٢أَخْبَرَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ قَالَ أَنْبَأَنَا حَمَّادُ بْنُ مَسْعَدَةَ عَنْ حُمَيْدٍ عَنْ ثَابِتٍ عَنْ أَنَسٍ قَالَ

رَأَى النَّبِيُّ ﷺ رَجُلاً يُهَادَى بَيْنَ رَجُلَيْنِ فَقَالَ مَا هَذَا قَالُوا نَذَرَ أَنْ يَمْشِيَ إِلَى بَيْتِ اللَّهِ قَالَ إِنَّ اللَّهَ غَنِيٌّ عَنْ تَعْذِيبِ هَذَا نَفْسَهُ مُرْهُ فَلْيَرْكَبْ