When the verse "And warn your nearest kindred" [Shuara 26:214] was revealed, the Prophet ﷺ climbed Safa and began calling out, "Descendants of Fihr! Descendants of Adi!" naming the clans of Quraysh until they gathered. If a man could not come out himself, he sent a messenger to see what the matter was. Abu Lahab came, along with the rest of Quraysh.The Prophet said, "Tell me, if I informed you that cavalry were in the valley about to raid you, would you believe me?"They replied, "Yes, we have never known you to be anything but truthful."He said, "Then I am a warner to you of a severe punishment that lies ahead."Abu Lahab said, "May you perish for the rest of your days! Is this why you gathered us?"So there was revealed, "May the hands of Abu Lahab perish, and may he perish. His wealth and what he earned availed him nothing" [Masad 111:1–2].
لما نزلت: {وأنذر عشيرتك الأقربين} صعد النبي ﷺ على الصفا، فجعل ينادي: يا بني فهر، يا بني عدي. لبطون قريش حتى اجتمعوا، فجعل الرجل إذا لم يستطع أن يخرج أرسل رسولا لينظر ما هو؟ فجاء أبو لهب وقريش، فقال: أرأيتكم لو أخبرتكم أن خيلا بالوادي تريد أن تغير عليكم، أكنتم مصدقي؟ قالوا: نعم، ما جربنا عليك إلا صدقا. قال: فإني نذير لكم بين يدي عذاب شديد. فقال أبو لهب: تبا لك سائر اليوم ألهذا جمعتنا؟ فنزلت: {تبت يدا أبي لهب وتب ما أغنى عنه ماله وما كسب}[المسد: ١- ٢].
Bukhari related it in the tafsir chapter (4770), and Muslim in the book of faith (208), both from the hadith of Amash, who said, Amr bin Mura narrated to me, from Saeed bin Jubayr, from Ibn Abbas, and he mentioned it. The wording is that of Bukhari.