Suuratul – Hujuraat Verse 13.
يَـٰٓأَيُّهَا ٱلنَّاسُ إِنَّا خَلَقْنَـٰكُم مِّن ذَكَرٍ وَأُنثَىٰ وَجَعَلْنَـٰكُمْ شُعُوبًا وَقَبَآئِلَ لِتَعَارَفُوٓا۟ ۚ إِنَّ أَكْرَمَكُمْ عِندَ ٱللَّـهِ أَتْقَىٰكُمْ ۚ إِنَّ ٱللَّـهَ عَلِيمٌ خَبِيرٌ ﴿١٣
13. O mankind, indeed We have created you from male and female and made you peoples and tribes that you may know one another. Indeed, the most noble of you in the sight of Allah is the most righteous of you. Indeed, Allah is Knowing and Acquainted.
Tafsir Ibn Kathir Volume 9, Page 206.
Allah the Exalted said,
﴿إِنَّ أَكْرَمَكُمْ عَندَ اللَّهِ أَتْقَـكُمْ﴾
(Verily, the most honorable of you with Allah is that (believer) who has At-Taqwa) meaning, `you earn honor with Allah the Exalted on account of Taqwa, not family lineage.’ There are many Hadiths from the Prophet that support this meaning. Al-Bukhari narrated that Abu Hurayrah said, “Some people asked the Prophet , `Who is the most honorable among people’ He replied,
«أَكْرَمُهُمْ عِنْدَ اللهِ أَتْقَاهُم»
(The most honorable among them with Allah is the one who has the most Taqwa) They said, `We did not ask you about this.’ He said,
«فَأَكْرَمُ النَّاسِ يُوسُفُ نَبِيُّ اللهِ، ابْنُ نَبِيِّ اللهِ، ابْنِ نَبِيِّ اللهِ ابْنِ خَلِيلِ الله»
(Then the most honorable person is Yusuf, Allah’s Prophet, the son of Allah’s Prophet, the son of Allah’s Prophet, the son of Allah’s Khalil) They said, `We did not ask you about this.’ He said,
«فَعَنْ مَعَادِنِ الْعَرَبِ تَسْأَلُونِّي»
(Then you want to ask me about the Arab lineage) They said, `Yes.’ He said,
«فَخِيَارُكُمْ فِي الْجَاهِلِيَّةِ خِيَارُكُمْ فِي الْإِسْلَامِ إِذَا فَقُهُوا»
(Those among you who were best in Jahiliyyah, are the best among you in Islam, if they attain religious understanding”). Al-Bukhari collected this Hadith in several places of his Sahih, An-Nasa’i did as well in the Tafsir section of his Sunan.