Chapter: About One Who Seeks The World With His Knowledge
Narrated Ibn Ka'b bin Malik: from his father that he heard the Messenger of Allah (ﷺ) saying: Whoever seeks knowledge to contend with the scholars, or to use it to argue with the fools, and to have people's faces turn towards him, then he shall be admitted to the Fire.
Narrated Ibn 'Umar: that the Prophet (ﷺ) said: Whoever learns knowledge for other than (the sake of) Allah, or intends by it other than Allah, then let him take his seat in the Fire.