Mishkat al-Masabih

Ka'b b. Malik reported God’s messenger as saying, “If anyone seeks knowledge to use it in vying with the learned, or disputing with the foolish, or to attract men’s attention to himself, God will bring him into hell.” Tirmidhi transmitted it, and Ibn Majah transmitted it from Ibn ‘Umar.

وَعَنْ كَعْبِ بْنِ مَالِكٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ طَلَبَ الْعِلْمَ لِيُجَارِيَ بِهِ الْعُلَمَاءَ أَوْ لِيُمَارِيَ بِهِ السُّفَهَاءَ أَوْ يصرف بِهِ وُجُوه النَّاس إِلَيْهِ أَدخل الله النَّار» . رَوَاهُ التِّرْمِذِيّ وَرَوَاهُ ابْن مَاجَه عَن ابْن عمر