One day the Messenger of Allah ﷺ climbed Safa and called out, "Come quickly!" The Quraysh gathered around him, and he said, "I am a warner to you before a severe punishment [Saba 34:46]. Tell me, if I informed you that an enemy was about to attack you by evening or by morning, would you believe me?"Abu Lahab said, "Is this why you gathered us? May you perish!"So Allah revealed, "May the hands of Abu Lahab perish, and may he perish" [Masad 111:1].
حدثنا هناد وأحمد بن منيع حدثنا أبو معاوية حدثنا الأعمش عن عمرو بن مرة عن سعيد بن جبير
صعد رسول الله ﷺ ذات يوم على الصفا فنادى يا صباحاه فاجتمعت إليه قريش فقال إني {نذير لكم بين يدي عذاب شديد} أرأيتم لو أني أخبرتكم أن العدو ممسيكم أو مصبحكم أكنتم تصدقوني فقال أبو لهب ألهذا جمعتنا تبا لك فأنزل الله {تبت يدا أبي لهب وتب}
Agreed upon [by Bukhari and Muslim]. Bukhari narrated it in the tafsir chapter, section on His saying, "perished, and what he gained did not avail him," hadith no. 4972, and Muslim, hadith no. 208, from the hadith of Abu Muawiya Dareer, through this same chain.