The Messenger of Allah ﷺ came upon a man being supported between his two sons. He asked, "What is the matter with this man?"It was said, "He has vowed to walk to the Kaabah."He said, "Allah has no need for this man to torture himself," and he ordered him to ride.
أخبرنا أحمد بن حفص قال حدثني أبي قال حدثني إبراهيم بن طهمان عن يحيى بن سعيد عن حميد الطويل
أتى رسول الله ﷺ على رجل يهادى بين ابنيه فقال ما شأن هذا فقيل نذر أن يمشي إلى الكعبة فقال إن الله لا يصنع بتعذيب هذا نفسه شيئا فأمره أن يركب
No references are available.
[Sahih]. Tirmidhi narrated it in "Vows and Oaths," chapter on what has been said about one who swears to walk but is unable to do so, hadith no. 1537, from the hadith of Humayd, with the same wording. It is also agreed upon, from the hadith of Humayd, from Thabit, from Anas, with the same wording. See the previous hadith.