كتاب الفضائل
43  
The Book of Virtues
(37)
Chapter: Respecting Him And Not Asking Him Unnecessary Questions
(37)
باب تَوْقِيرِهِ صلى الله عليه وسلم وَتَرْكِ إِكْثَارِ سُؤَالِهِ عَمَّا لاَ ضَرُورَةَ إِلَيْهِ أَوْ لاَ يَت
Sahih Muslim 1337 b

Abu Huraira reported that he heard Allah's Messenger (ﷺ) as saying:

Avoid that which I forbid you to do and do that which I command you to do to the best of your capacity. Verily the people before you went to their doom because they had put too many questions to their Prophets and then disagreed with their teachings.
حَدَّثَنِي حَرْمَلَةُ بْنُ يَحْيَى التُّجِيبِيُّ، أَخْبَرَنَا ابْنُ وَهْبٍ، أَخْبَرَنِي يُونُسُ، عَنِ ابْنِ شِهَابٍ، أَخْبَرَنِي أَبُو سَلَمَةَ بْنُ عَبْدِ الرَّحْمَنِ، وَسَعِيدُ بْنُ الْمُسَيَّبِ، قَالاَ كَانَ أَبُو هُرَيْرَةَ يُحَدِّثُ أَنَّهُ سَمِعَ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏ "‏ مَا نَهَيْتُكُمْ عَنْهُ فَاجْتَنِبُوهُ وَمَا أَمَرْتُكُمْ بِهِ فَافْعَلُوا مِنْهُ مَا اسْتَطَعْتُمْ فَإِنَّمَا أَهْلَكَ الَّذِينَ مِنْ قَبْلِكُمْ كَثْرَةُ مَسَائِلِهِمْ وَاخْتِلاَفُهُمْ عَلَى أَنْبِيَائِهِمْ ‏"‏ ‏.‏
Reference : Sahih Muslim 1337b
In-book reference : Book 43, Hadith 171
USC-MSA web (English) reference : Book 30, Hadith 5818
  (deprecated numbering scheme)