Amr bin Khalid narrates from Zayd bin Ali (may Allah have mercy on him), and he from his forefathers, that the Messenger of Allah (peace and blessings be upon him) asked: "Who is the most intelligent of people?" The narrator says: I said: "Allah and His Messenger (peace and blessings be upon him) know best." He (peace and blessings be upon him) said: "Indeed, the wisest of people is the one who remembers death the most and prepares for it best."
Imam al-Harith recorded it, and its narrator Amr is da'if (weak).