Sunan Ibn Majah #258 · 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 Prophet said: "Whoever seeks knowledge for a reason other than the sake of Allah, or intends it for a purpose other than for the sake of Allah, let him take his place in hell
حَدَّثَنَا زَيْدُ بْنُ أَخْزَمَ، وَأَبُو بَدْرٍ عَبَّادُ بْنُ الْوَلِيدِ قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ عَبَّادٍ الْهُنَائِيُّ، حَدَّثَنَا عَلِيُّ بْنُ الْمُبَارَكِ الْهُنَائِيُّ، عَنْ أَيُّوبَ السَّخْتِيَانِيِّ، عَنْ خَالِدِ بْنِ دُرَيْكٍ، عَنِ ابْنِ عُمَرَ، أَنَّ النَّبِيَّ ـ صلى الله عليه وسلم ـ قَالَ ‏
"‏ مَنْ طَلَبَ الْعِلْمَ لِغَيْرِ اللَّهِ أَوْ أَرَادَ بِهِ غَيْرَ اللَّهِ فَلْيَتَبَوَّأْ مَقْعَدَهُ مِنَ النَّارِ ‏"‏ ‏.‏
Reference : Sunan Ibn Majah 258