Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ibnmajah:243Yaʿqūb b. Ḥumayd b. Kāsib al-Madanī > Isḥāq b. Ibrāhīm > Ṣafwān b. Sulaym > ʿUbaydullāh b. Ṭalḥah > al-Ḥasan al-Baṣrī > Abū Hurayrah

The Prophet said: "The best of charity is when a Muslim man gains knowledge, then he teaches it to his Muslim brother."  

ابن ماجة:٢٤٣حَدَّثَنَا يَعْقُوبُ بْنُ حُمَيْدِ بْنِ كَاسِبٍ الْمَدَنِيُّ حَدَّثَنِي إِسْحَاقُ بْنُ إِبْرَاهِيمَ عَنْ صَفْوَانَ بْنِ سُلَيْمٍ عَنْ عُبَيْدِ اللَّهِ بْنِ طَلْحَةَ عَنِ الْحَسَنِ الْبَصْرِيِّ عَنْ أَبِي هُرَيْرَةَ

أَنَّ النَّبِيَّ ﷺ قَالَ أَفْضَلُ الصَّدَقَةِ أَنْ يَتَعَلَّمَ الْمَرْءُ الْمُسْلِمُ عِلْمًا ثُمَّ يُعَلِّمَهُ أَخَاهُ الْمُسْلِمَ  


See similar narrations below:

Collected by Suyūṭī
suyuti:3777a

The Prophet said: "The best of charity is when a Muslim man gains knowledge, then he teaches it to his Muslim brother." (Using translation from Ibn Mājah 243)   

السيوطي:٣٧٧٧a

"أفضل الصدقة : أن يتعلَّمَ المرءُ المسلمُ علما، ثم يُعَلِّمَه أخاهُ المسلم".  

[هـ] ابن ماجة عن أبي هريرة