Sayyiduna Duhak bin Abu Jubair رضي الله عنه narrates: In the time of ignorance, people used to have titles. The Prophet Muhammad صلى الله عليه وسلم called a person by his title. The Prophet صلى الله عليه وسلم was informed, "O Messenger of Allah (صلى الله عليه وسلم)! This person dislikes it." So Allah Almighty revealed this verse: "Do not call each other by bad names. After believing, calling someone a sinner is a bad name." The narrator states: It was the practice of the Ansar that whoever Allah willed, they would give charity and donations, until once a famine struck them, so they stopped doing so. Then Allah Almighty revealed this verse: "And spend in the way of Allah and do not throw yourselves into destruction with your own hands, and do good; indeed, Allah loves those who do good."
Hadith Referenceصحیح ابن حبان / كتاب الحظر والإباحة / 5709
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «التعليق على ابن ماجه». * [الضَّحَّاكِ بْنِ أَبِي جَبِيرَةَ] قال الشيخ: الصواب: (أبو جبيرة بن الضحاك) على القلب، كذلك رواه جمع من الثقات. انظر التعليق على «الموارد» (1761).فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح