The Prophet ﷺ said, "While a man was walking in a fine garment, admiring himself with his hair combed and flowing, Allah caused the earth to swallow him, and he will keep sinking into it until the Day of Resurrection."
قال النبي ﷺ: بينما رجل يمشي في حلة تعجبه نفسه مرجل جمته إذ خسف الله به فهو يتجلجل إلى يوم القيامة.
Bukhari narrated it in the Book of Clothing (5789), and Muslim in the Book of Clothing (2088:49), both through routes from Shubah, who said, Muhammad bin Ziyad told us, he said, I heard Abu Hurairah, and he related it. The wording given is Bukhari's, and Muslim did not present his own wording, but rather referred back to the previous hadith, which he narrated through the route of Rabi bin Muslim, from Muhammad bin Ziyad, from Abu Hurairah, with the wording, "While a man was walking, delighted with his flowing hair and his two cloaks, the earth suddenly swallowed him, and he keeps sinking into it until the Hour comes."He also narrated it through other routes from Abu Hurairah (2088:50) with similar wordings close to this. And in the narration of Abu Rafi from Abu Hurairah he said, "A man from among those who came before you was strutting about in a fine garment..." and he related it. Mamar added, in his narration from Muhammad bin Ziyad, from Abu Hurairah, the wording, "While a man was strutting about in a fine garment, delighted with his flowing hair, having let his lower garment trail, the earth swallowed him up..."Abdul-Razzaq narrated it in his Musannaf (11/82) from Mamar, from Muhammad bin Ziyad, with his chain of transmission.