This actually one of the objections which non Ahmadi’s say about the Promised Messiah(As) that if he is the imam mahdi was he not suppose to be from the family of the Prophet(saw)? The first answer to this is that the people posing this question to you do not know about the family background of the Messiah(as) and they also failed to understand the hadith.
Firstly according to Quran and hadith, other then being from the physical family of the Prophet(saw) , being his true follower and believer can also include you in his family.
Allah states:
‘My Lord, they have indeed led astray many among mankind. So whoever follows me, he is certainly of me; and whoever disobeys me — Thou art, surely, Most Forgiving, Merciful.(Chapter 14 verse 37)
The Holy Prophet(saw) also in hadith has said about the imam mahdi, that he will be from me. But one has to remember that being of Holy Prophet(Saw)’s family is not limited to only being his literal and physical family.
The proof of this is from the Quran itself, that Allah does not care about the blood rather Allah only cares about the taqwa of the believer.
O mankind, We have created you from a male and a female; and We have made you into tribes and sub-tribes that you may recognize one another. Verily, the most honourable among you, in the sight of Allah, is he who is the most righteous among you. Surely, Allah is All-knowing, All-Aware.(Chapter 49 verse 14)
Hazrat Nuh(as) son was of his family but not of his real family because he was not a believer. Allah revealed to Nuh (As) in Chapter 11 verse 47 that :
He said, “O Noah, indeed he is not of your family; indeed, he is [one whose] work was other than righteous, so ask Me not for that about which you have no knowledge. Indeed, I advise you, lest you be among the ignorant.”(Chapter 11 verse 47)
So now a physical literal son of Noah(as) is being told by Allah to not be of his sons because of his behavior. Now here is what is interesting. The Holy Prophet(Saw) said about Hazrat Salman Farsi(ra) that: Salman(ra) is from the people of my family.
This is further supported by chapter 33 verse 7 where Allah states:
The Prophet is closer to the believers than their selves, and his wives are as their mothers. And the owners of kinship are closer one to another in the ordinance of Allah than (other) believers and the fugitives (who fled from Mecca), except that ye should do kindness to your friends. This is written in the Book (of nature). (Chapter 33 verse 7)
Now we know that Muhammad(saw) has said that Salman Farsi(ra) is of his spiritual family, and this is further supported with the case of the messiah(As) because of this beautiful incident :
حَدَّثَنِي عَبْدُ الْعَزِيزِ بْنُ عَبْدِ اللَّهِ، قَالَ حَدَّثَنِي سُلَيْمَانُ بْنُ بِلاَلٍ، عَنْ ثَوْرٍ، عَنْ أَبِي الْغَيْثِ، عَنْ أَبِي هُرَيْرَةَ، رضى الله عنه قَالَ كُنَّا جُلُوسًا عِنْدَ النَّبِيِّ صلى الله عليه وسلم فَأُنْزِلَتْ عَلَيْهِ سُورَةُ الْجُمُعَةِ {وَآخَرِينَ مِنْهُمْ لَمَّا يَلْحَقُوا بِهِمْ} قَالَ قُلْتُ مَنْ هُمْ يَا رَسُولَ اللَّهِ فَلَمْ يُرَاجِعْهُ حَتَّى سَأَلَ ثَلاَثًا، وَفِينَا سَلْمَانُ الْفَارِسِيُّ، وَضَعَ رَسُولُ اللَّهِ صلى الله عليه وسلم يَدَهُ عَلَى سَلْمَانَ ثُمَّ قَالَ ” لَوْ كَانَ الإِيمَانُ عِنْدَ الثُّرَيَّا لَنَالَهُ رِجَالٌ ـ أَوْ رَجُلٌ ـ مِنْ هَؤُلاَءِ ”.
Narrated Abu Huraira:
While we were sitting with the Prophet (ﷺ) Surat Al-Jumu’a was revealed to him, and when the Verse, “And He (Allah) has sent him (Muhammad) also to other (Muslims)…..’ (62.3) was recited by the Prophet, I said, “Who are they, O Allah’s Messenger (ﷺ)?” The Prophet (ﷺ) did not reply till I repeated my question thrice. At that time, Salman Al-Farisi was with us. So Allah’s Messenger (ﷺ) put his hand on Salman, saying, “If Faith were at (the place of) Ath-Thuraiya (pleiades, the highest star), even then a man from these people (i.e. Salman’s folk) would attain it.” (Bukhari, Volume 6, Book 60, Hadith #4897)
Muhammad(saw) tells us that the messiah would be from the spiritual lineage of Salman farsi(ra) meaning of persian lineage since it was a room full of arab companions and he was the only farsi sitting there. It is also a clear fact that during the battle of the ditch The Holy Prophet Muhammad(saw) made Salman Farsi(ra) stand with his family which further proves the point of a spiritual family which the mahdi would be from.
Here are two further quotes of the Messiah(as)
“Although I am not from the descendants from Alevis (descendants of Hazrat Ali(ra) from other than Fatima(as)) I am from the lineage of Bani Fatima(as). Some of my paternal grandmothers were from among well known saadaat(female members of the family of Prophet Muhammad(saw). It was a practice among our family that at times women from saadat would be wed into our family and ours into theirs” (Ruhani Khazain Volume 18 page 426 footnote Nazul Ul Masih)
Again Ahmad(as) states in A Misconception Removed on page 15:
“People who think in physical terms, sometimes link the Promised One to the progeny of Hasan(ra), sometimes to Hussain(ra) and sometimes to Abbas(ra). But what the Holy Prophet(saw) really meant was that the promised One would be his heir, kust likea son, i.e he would inherit his name, his character, his knowledge, his spirituality, and would reflect his very image. He will acquire nothing on his own but will acquire everything from the Holy prophet(saw) and will so lose himself in him (sa) as to reflect his(sa) very Image” (A misconception removed Pg 15)
While we were sitting with the Prophet (ﷺ) Surat Al-Jumu’a was revealed to him, and when the Verse, “And He (Allah) has sent him (Muhammad) also to other (Muslims)…..’ (62.3) was recited by the Prophet, I said, “Who are they, O Allah’s Messenger (ﷺ)?” The Prophet (ﷺ) did not reply till I repeated my question thrice. At that time, Salman Al-Farisi was with us. So Allah’s Messenger (ﷺ) put his hand on Salman, saying, “If Faith were at (the place of) Ath-Thuraiya (pleiades, the highest star), even then a man from these people (i.e. Salman’s folk) would attain it.” (Bukhari, Volume 6, Book 60, Hadith #4897)
Muhammad(saw) tells us that the messiah would be from the spiritual lineage of Salman farsi(ra) meaning of persian lineage since it was a room full of arab companions and he was the only farsi sitting there. It is also a clear fact that during the battle of the ditch The Holy Prophet Muhammad(saw) made Salman Farsi(ra) stand with his family which further proves the point of a spiritual family which the mahdi would be from.
Here are two further quotes of the Messiah(as)
“Although I am not from the descendants from Alevis (descendants of Hazrat Ali(ra) from other than Fatima(as)) I am from the lineage of Bani Fatima(as). Some of my paternal grandmothers were from among well known saadaat(female members of the family of Prophet Muhammad(saw). It was a practice among our family that at times women from saadat would be wed into our family and ours into theirs” (Ruhani Khazain Volume 18 page 426 footnote Nazul Ul Masih)
Again Ahmad(as) states in A Misconception Removed on page 15:
“People who think in physical terms, sometimes link the Promised One to the progeny of Hasan(ra), sometimes to Hussain(ra) and sometimes to Abbas(ra). But what the Holy Prophet(saw) really meant was that the promised One would be his heir, kust likea son, i.e he would inherit his name, his character, his knowledge, his spirituality, and would reflect his very image. He will acquire nothing on his own but will acquire everything from the Holy prophet(saw) and will so lose himself in him (sa) as to reflect his(sa) very Image” (A misconception removed Pg 15)