Hadithcore
Mishkat al-Masabih, 259

Anas b. Malik said that God’s messenger asked, “Do you know who is most generous?" On receiving the reply that God and His messenger knew best, he said, “God is the most generous, then I am the most generous of mankind, and the most generous of them after me will be a man who acquires knowledge and spreads it. On the day of resurrection he will come as a prince alone.” Or he said, “As one people."

وَعَنْ أَنَسِ بْنِ مَالِكٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «هَلْ تَدْرُونَ مَنْ أَجْوَدُ جُودًا؟» قَالُوا: اللَّهُ وَرَسُولُهُ أَعْلَمُ. قَالَ: «اللَّهُ تَعَالَى أَجْوَدُ جُودًا ثُمَّ أَنَا أَجْوَدُ بَنِي آدَمَ وَأَجْوَدُهُمْ مِنْ بَعْدِي رَجُلٌ عَلِمَ عِلْمًا فَنَشَرَهُ يَأْتِي يَوْمَ الْقِيَامَةِ أَمِيرًا وَحده أَو قَالَ أمة وَحده»

References1 variant
In-Book Reference
Book 2, Hadith 56