Sahih Muslim 2358c
This hadith has been transmitted on the authority of 'Amir b. Sa'd and the words are. Messenger of Allah ﷺ said: The greatest sinner of the Muslims amongst Muslims is one who asked about a certain thing which had not been prohibited and it was prohibited because of his asking about it. This hadith has been narrated on the authority of Zuhri with the same chain of transmitters and with this addition:" A person asked about a thing from Allah's Apostle ﷺ and he indulged in hair-splitting."
وَحَدَّثَنَاهُ أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَابْنُ أَبِي عُمَرَ، قَالاَ حَدَّثَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، عَنِ الزُّهْرِيِّ، ح وَحَدَّثَنَا مُحَمَّدُ بْنُ عَبَّادٍ، حَدَّثَنَا سُفْيَانُ، قَالَ - أَحْفَظُهُ كَمَا أَحْفَظُ بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ - الزُّهْرِيُّ عَنْ عَامِرِ بْنِ سَعْدٍ عَنْ أَبِيهِ قَالَ قَالَ رَسُولُ اللَّهِ ﷺ " أَعْظَمُ الْمُسْلِمِينَ فِي الْمُسْلِمِينَ جُرْمًا مَنْ سَأَلَ عَنْ أَمْرٍ لَمْ يُحَرَّمْ فَحُرِّمَ عَلَى النَّاسِ مِنْ أَجْلِ مَسْأَلَتِهِ " .