We marched with the Messenger of Allah ﷺ on the expedition of Batn Buwat, where he was pursuing Majdi bin Amr al-Juhani. Each water-carrying camel was shared by five, six, or seven of us, taking turns riding it.The turn of one of the Ansar came up on his camel. He made it kneel, mounted it, and then urged it on, but it balked at him for a moment. He said to it, "Move on, may Allah curse you."The Messenger of Allah ﷺ asked, "Who is this cursing his camel?"The man replied, "It is I, Messenger of Allah."He said, "Get down from it. Do not accompany us with something cursed. Do not invoke curses upon yourselves, nor upon your children, nor upon your possessions. You may chance upon an hour from Allah in which a gift is being asked, and it would be granted to you."
سرنا مع رسول الله ﷺ في غزوة بطن بواط، وهو يطلب المجدي بن عمرو الجهني، وكان الناضح يعتقبه منا الخمسة والستة والسبعة، فدارت عقبة رجل من الأنصار على ناضح له، فأناخه، فركبه، ثم بعثه، فتلدن عليه بعض التلدن، فقال له: شأ لعنك الله. فقال رسول الله ﷺ: من هذا اللاعن بعيره؟ قال: أنا يا رسول الله. قال: انزل عنه، فلا تصحبنا بملعون، لا تدعوا على أنفسكم، ولا تدعوا على أولادكم، ولا تدعوا على أموالكم، لا توافقوا من الله ساعة يسأل فيها عطاء، فيستجيب لكم.
Muslim narrated it in Zuhd and Raqaiq (3009) through several routes from Hatim bin Ismail, from Yaqub bin Mujahid Abu Hazrah, from Ubada bin Walid bin Ubada bin Samit, from Jabir bin Abdullah, in a long hadith.