Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:4622al-Faḍl b. Sahl > Abū al-Naḍr > Abū Khaythamah > Abū al-Jūwayriyah > Ibn ʿAbbās

Some people were asking Messenger of Allah ﷺ questions mockingly. A man would say, "Who is my father?" Another man whose she-camel had gone astray would say, "Where is my she-camel? "So Allah revealed this Verse in this connection: "O you who believe! Ask not about things which, if made plain to you, may cause you trouble." (5.101)  

البخاري:٤٦٢٢حَدَّثَنَا الْفَضْلُ بْنُ سَهْلٍ حَدَّثَنَا أَبُو النَّضْرِ حَدَّثَنَا أَبُو خَيْثَمَةَ حَدَّثَنَا أَبُو الْجُوَيْرِيَةِ عَنِ ابْنِ عَبَّاسٍ ؓ قَالَ

كَانَ قَوْمٌ يَسْأَلُونَ رَسُولَ اللَّهِ ﷺ اسْتِهْزَاءً فَيَقُولُ الرَّجُلُ مَنْ أَبِي وَيَقُولُ الرَّجُلُ تَضِلُّ نَاقَتُهُ أَيْنَ نَاقَتِي فَأَنْزَلَ اللَّهُ فِيهِمْ هَذِهِ الآيَةَ {يَا أَيُّهَا الَّذِينَ آمَنُوا لاَ تَسْأَلُوا عَنْ أَشْيَاءَ إِنْ تُبْدَ لَكُمْ تَسُؤْكُمْ} حَتَّى فَرَغَ مِنَ الآيَةِ كُلِّهَا  


See similar narrations below:

Collected by Ṭabarānī
tabarani:12695Muḥammad b. al-ʿAbbās al-Muʾaddib > ʿUbayd b. Isḥāq al-ʿAṭṭār > Zuhayr > Abū al-Jūwayriyah al-Jarmī > Ibn ʿAbbās

[Machine] "Do you know why this verse was revealed? O you who have believed, do not ask about things that, if they are shown to you, will distress you. There were people who used to mock the Messenger of Allah ﷺ by saying, 'Who is my father?' And he would also say, 'My camel has gone astray, where is my camel?' So Allah revealed this verse."  

الطبراني:١٢٦٩٥حَدَّثَنَا مُحَمَّدُ بْنُ الْعَبَّاسِ الْمُؤَدِّبُ ثنا عُبَيْدُ بْنُ إِسْحَاقَ الْعَطَّارُ ثنا زُهَيْرٌ عَنْ أَبِي الْجُوَيْرِيَةِ الْجَرْمِيِّ عَنِ ابْنِ عَبَّاسٍ قَالَ

أَتَدْرِي فِيمَ أُنْزِلَتْ هَذِهِ الْآيَةُ؟ {يَا أَيُّهَا الَّذِينَ آمَنُوا لَا تَسْأَلُوا عَنْ أَشْيَاءَ إِنْ تُبْدَ لَكُمْ تَسُؤْكُمْ} كَانَ أُنَاسٌ يَسْأَلُونَ رَسُولَ اللهِ ﷺ اسْتِهْزَاءً يَقُولُ الرَّجُلُ مَنْ أَبِي؟ وَيَقُولُ ضَلَّتْ نَاقَتِي أَيْنَ نَاقَتِي؟ فَأَنْزَلَ اللهُ هَذِهِ الْآيَةَ