A man came to the Messenger of Allah ﷺ and said, "Messenger of Allah, hardship has struck me."So he sent word to his wives, but found nothing with them. The Messenger of Allah ﷺ then said, "Is there no man who will host this one tonight? A man who will host him tonight, may Allah have mercy on him."A man from the Ansar stood up and said, "I will, Messenger of Allah."He went to his family and said to his wife, "This is the guest of the Messenger of Allah ﷺ. Do not hold anything back from him."She replied, "By Allah, I have nothing except the children's food."He said, "When the children want their dinner, put them to sleep, then come and put out the lamp. We will tighten our bellies tonight."She did so. Then the man went in the morning to the Messenger of Allah ﷺ, who said, "Allah has marveled," or "smiled at what so-and-so and his wife did." Then Allah
revealed, "And they prefer others over themselves, even though they themselves are in need" [Hashr 59:9].
أتى رجل رسول الله ﷺ، فقال: يا رسول الله، أصابني الجهد، فأرسل إلى نسائه فلم يجد عندهن شيئا، فقال رسول الله ﷺ: ألا رجل يضيفه هذه الليلة، رجل يضيفه هذه الليلة، يرحمه الله؟ فقام رجل من الأنصار فقال: أنا يا رسول الله، فذهب إلى أهله، فقال لامرأته: ضيف رسول الله ﷺ لا تدخريه شيئا. قالت: والله ما عندي إلا قوت الصبية. قال: فإذا أراد الصبية العشاء فنوميهم وتعالي، فأطفئي السراج، ونطوي بطوننا الليلة، ففعلت، ثم غدا الرجل على رسول الله ﷺ، فقال: لقد عجب الله، عز وجل أو ضحك من فلان وفلانة فأنزل الله عز وجل: {ويؤثرون على أنفسهم ولو كان بهم خصاصة}[الحشر: ٩].
Bukhari related it in the tafsir (4889), and Muslim in the drinks chapter (2054), both by way of Fudayl bin Ghazwan, who said, Abu Hazim Ashjai narrated to us, from Abu Hurairah, who said, and then he mentioned it. The wording given is Bukhari's, and Muslim's wording is similar. In one version reported by Muslim, "Then a man from the Ansar stood up, called Abu Talha."