Sunan Ibn Majah - سنن ابن ماجه
The Book of the Sunnah - كتاب المقدمة
It was narrated that Abu Hurairah said:
"The Messenger of Allah said: 'Whoever seeks knowledge in order to argue with the foolish, or to show off before the scholars, or to attract people's attention, Allah will admit him to Hell.'"
حَدَّثَنَا مُحَمَّدُ بْنُ إِسْمَاعِيلَ، أَنْبَأَنَا وَهْبُ بْنُ إِسْمَاعِيلَ الأَسَدِيُّ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ سَعِيدٍ الْمَقْبُرِيُّ، عَنْ جَدِّهِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ . " مَنْ تَعَلَّمَ الْعِلْمَ لِيُبَاهِيَ بِهِ الْعُلَمَاءَ وَيُمَارِيَ بِهِ السُّفَهَاءَ وَيَصْرِفَ بِهِ وُجُوهَ النَّاسِ إِلَيْهِ أَدْخَلَهُ اللَّهُ جَهَنَّمَ "