عن أبي هريرة رضي الله عنه قال: قِيلَ: يا رسُول الله، مَن أَكرم النَّاس، قال: اتقاهم، فقالوا: لَيس عن هذا نَسأُلُك، قال: «فَيُوسُفُ نَبِيُّ الله ابنُ نَبِيِّ الله ابنِ نَبِيِّ الله ابنِ خَلِيلِ اللهِ» قالوا: لَيس عَن هذا نَسأَلُك، قال: «فعَن مَعَادِن العَرَب تسأَلُوني؟ خِيَارُهُم في الجاهِليَّة خِيَارُهُم في الإِسلام إذا فَقُهُوا».
[صحيح] - [متفق عليه]
Abu Hurayrah (may Allah be pleased with him) reported: It was said: "O Messenger of Allah, who is the most honorable among people?" He replied: "The most pious among them." They said: "We are not asking you about this." He said: "Then, Yusuf (Joseph), the prophet of Allah, son of the prophet of Allah, son of the prophet of Allah, son of the intimate friend of Allah." They said: "We are not asking you about this." He said: "Are you then asking me about the origins of the Arabs? The best of them in the pre-Islamic era are the best of them in Islam, provided that they acquire religious knowledge."
Sahih/Authentic. - [Al-Bukhari and Muslim]
The Hadīth explains that the most honorable among people in terms of ancestry, lineage, and origins are the best during the pre-Islamic era, provided that they attain religious knowledge. For example, it is known that Banu Hāshim are the best of Quraysh in Islam, provided that they understand Allah's religion and learn its rulings. However, failing to attain understanding in religion, noble lineage will be of no avail. If one is of a high lineage and from the most noble of Arab ancestry, this will not make such a person from the most honorable of creation in the sight of Allah. Based on this, a person is honored by his lineage, on condition that he possesses understanding of the religion.