The previous verses have condemned the infidelity and the arrogant attitude of the infidels and its destructive results. In these verses, the people of Makkah are being put to shame by telling them that even jinn, who are even more proud and haughty than you, had their hearts softened after hearing the Qur'an, and they became Muslims; Allah has given the humans more sense and intelligence than jinns, and despite that they do not embrace faith.
The incident of the jinn listening to the Qur'an and then embracing faith is stated in authentic ahadith. When the Holy Prophet ﷺ was blessed with prophethood, the jinns were stopped from listening to the news of the heavens, and if a jinn ventured to go upwards to overhear the heavenly news, was chased away by a meteor directed towards him.
The jinns consulted each other to find out the cause of this new phenomenon that has stopped them from listening to the news from the heavens. They believed that some new event happening in the world may have been the cause. In order to discover that event, various groups of jinns spread out in different parts of the world to investigate this phenomenon. One of the groups reached Hijaz also when the Holy Prophet along with some of his companions was present at a place called Batn Nakhlah and was intending to go to the fair of ` Ukaz'. (Arabs used to setup trade-fairs on special days in various places for commercial and social purposes where people of all areas used to assemble, set up shops and arrange meetings and social gatherings much like the exhibitions of our days. One such fair used to be set up in ` Ukaz where the Holy Prophet ﷺ was intending to go probably for preaching and calling towards Islam.) The Holy Prophet ﷺ was leading the morning prayers in Batn nakhlah when the jinns reached there. After hearing the Qur'an, they exclaimed that this was that new matter which has come between them and the heavenly news. (Ahmad, Bukhari, Muslim, Tirmidhi, Nasa'i, etc., with the authority of Ibn ` Abbas ؓ
According to another narration, when the jinns came there, they directed each other to keep quiet and listen to the Qur'an. When the Holy Prophet ﷺ finished his prayers, they put their belief in Islam, embraced it, went back to their people and informed them of the real cause of the new phenomenon. They also told their people that they had become Muslims and advised them that they should also embrace the faith. But the Holy Prophet ﷺ did not become aware of the jinns coming and going and of their embracing the faith after listening to the Qur'an until Surah jinn was revealed wherein he was informed of this incident. (Ibn-ul-Mundhir quoting ` Abdul Malik)
Another narration states that these jinns were inhabitants of Nasibin, either seven or nine in number. When they told their nation about it and motivated them to embrace faith, three hundred of them presented themselves for embracing Islam. (Abu Nu'aim, Al-Waqidi, quoting Ka` b al-Ahbar, as in Ruh-ul-Ma’ ani). There are diverse narrations in other ahadith also, but since they are about various incidents at different times, there is no contradiction between them. That these are different incidents is supported by a statement of Ibn ` Abbas reported by Tabarani in Awsat and by Ibn Marduwaih that the jinns came to the Holy Prophet ﷺ many times.
Khafaji has said that the cumulative outcome of various ahadith is that jinn presented themselves to the Holy Prophet ﷺ six times for benefiting from his teachings. (Ruh-ul-Ma ani and Bayan-ul-Qur an)