An Arab man would worship a stone, and whenever he found a finer one, he would take it and abandon the first. So Allah revealed, "Have you seen the one who takes his own desire as his god?" [Jathiyah 45:23]
كان الرجل من العرب يعبد الحجر، فإذا وجد أحسن منه أخذه، وأبقى الآخر، فأنزل الله عز وجل: {أفرأيت من اتخذ إلهه هواه}
No references are available.
Nasai narrated it in Kubra (11421), and Hakim graded it sahih (2/452–453), both of them through the route of Mutarrif, from Jafar, from Saeed bin Jubayr, from Ibn Abbas, who mentioned it.Its isnad is hasan because of Jafar, who is Jafar bin Abu Mughira Qummi, for his hadith is hasan.Note: In the printed edition of Mustadrak Hakim it says "Jafar bin Iyas," and likewise in Ithaf Mahra (7/153), so it appears that this is an old error, because Mutarrif was among the students of Jafar bin Abu Mughira.Then I found that Mizzi also mentioned this hadith in Tuhfat Ashraf (5468), in the biographical entry of Jafar bin Abu Mughira, from Saeed bin Jubayr, from Ibn Abbas.Of similar meaning is the statement of Abu Raja Attaradi, narrated by Bukhari in the chapter on military expeditions (4376-4377), though it does not mention the revelation of the verse, and it is mentioned in the book The Biography of the Prophet ﷺ.