The Messenger of Allah ﷺ did not recite the Quran to the jinn, nor did he see them. The Messenger of Allah ﷺ set out with a group of his companions heading toward the market of Ukaz, at a time when the devils had been barred from the news of heaven and shooting stars were being hurled at them.The devils returned to their people, who asked them, "What is wrong with you?"They replied, "We have been barred from the news of heaven, and shooting stars have been hurled at us."Their people said, "Nothing has caused this except some new event. So travel through the east and west of the earth and find out what has come between you and the news of heaven."They set out, traveling through the east and west of the earth. The group that had headed toward Tihamah came upon the Prophet ﷺ at Nakhl, while he was on his way to the market of Ukaz, leading his companions in the dawn prayer. When they heard the Quran, they listened intently and said, "This is what has come between us and the news of heaven."They returned to their people and said, "Our people, we have heard a wondrous recitation that guides to right conduct, so we have believed in it, and we shall never associate anyone with our Lord."Then Allah revealed to His Prophet Muhammad, "Say, it has been revealed to me that a group of the jinn listened, and they said, 'Indeed, we have heard a wondrous recitation'" [Jinn 72:1]. The hadith continues.
ما قرأ رسول الله ﷺ على الجن وما رآهم، انطلق رسول الله ﷺ في طائفة من أصحابه عامدين إلى سوق عكاظ، وقد حيل بين الشياطين وبين خبر السماء، وأرسلت عليهم الشهب، فرجعت الشياطين إلى قومهم فقالوا: ما لكم؟ قالوا: حيل بيننا وبين خبر السماء، وأرسلت علينا الشهب قالوا: ما ذاك إلا من شيء حدث فاضربوا مشارق الأرض ومغاربها فانظروا ما هذا الذي حال بيننا وبين خبر السماء؟ فانطلقوا يضربون مشارق الأرض ومغاربها، فمر النفر الذين أخذوا نحو تهامة-وهو بنخل- عامدين إلى سوق عكاظ،- وهو يصلي بأصحابه صلاة الفجر- فلما سمعوا القرآن استمعوا له، وقالوا: هذا الذي حال بيننا وبين خبر السماء فرجعوا إلى قومهم فقالوا: يا قومنا إنا سمعنا قرآنا عجبا يهدي إلى الرشد فآمنا به ولن نشرك بربنا أحدا فأنزل الله عز وجل على نبيه محمد: {قل أوحي إلي أنه استمع نفر من الجن فقالوا إنا سمعنا قرآنا عجبا}[الجن: ١] الحديث.
Bukhari related it in the Book of Adhan (773) and the Book of Tafsir (4921), and Muslim in the Book of Prayer (449-149), both of them via Abu Awana, from Abu Bishr Jafar bin Abu Wahshiya, from Saeed bin Jubayr, from Ibn Abbas, who mentioned it. The wording given here is that of Muslim.