Mishkat al-Masabih
Abu Darda’ said that the one who would have the worst position in God’s sight on the day of resurrection would be a learned man who did not profit from his learning.” Darimi transmitted it.
وَعَنْ أَبِي الدَّرْدَاءِ قَالَ: " إِنَّ مِنْ أَشَرِّ النَّاسِ عِنْدَ اللَّهِ مَنْزِلَةً يَوْمَ الْقِيَامَةِ: عَالِمٌ لَا ينْتَفع بِعِلْمِهِ ". رَوَاهُ الدَّارمِيّ
Reference