Sunan Ibn Majah #253 · The Book of the Sunnah

Sunan Ibn MajahIt was narrated from Ibn 'Umar that
Sunan Ibn Majah · The Book of the Sunnah
Sunan Ibn Majah · كتاب السنة
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, will be in Hell
حَدَّثَنَا هِشَامُ بْنُ عَمَّارٍ، حَدَّثَنَا حَمَّادُ بْنُ عَبْدِ الرَّحْمَنِ، حَدَّثَنَا أَبُو كَرِبٍ الأَزْدِيُّ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، عَنِ النَّبِيِّ ـ صلى الله عليه وسلم ـ قَالَ ‏
"‏ مَنْ طَلَبَ الْعِلْمَ لِيُمَارِيَ بِهِ السُّفَهَاءَ أَوْ لِيُبَاهِيَ بِهِ الْعُلَمَاءَ أَوْ لِيَصْرِفَ وُجُوهَ النَّاسِ إِلَيْهِ فَهُوَ فِي النَّارِ ‏"‏ ‏.‏
Reference : Sunan Ibn Majah 253