There are numerous verses of the Qur’an and hadiths that prove
the parents of prophets were Muslims(believers).
Qur’an – The Prophet [PBUH] is from a Pure Progeny:
وَتَوَكَّلۡ عَلَى ٱلۡعَزِيزِ ٱلرَّحِيمِ
ٱلَّذِي يَرَىٰكَ حِينَ تَقُومُ
وَتَقَلُّبَكَ فِي ٱلسَّٰجِدِينَ
And rely on the Mighty, the Merciful, Who sees you when you stand up. And your movements among those who prostrate themselves before Allah.
The parents of prophets
‘AbdAllah ibn ‘Abbas says in its commentary:
Here, movements refers to passing through the blessed generations of Prophets(parents of prophets) until he was sent to this nation.
Another commentary is narrated from ‘AbdAllah ibn ‘Abbas:
Movements means passing from one pure generation (parents of prophets) to the other.
(Masalik al-Hunafa, p.40)
Sajidin refers to the believers (Muslims):
In the verse, commentators have taken Sajidin [those who
prostrate] to refer to believers; meaning from Adam and
Hawwa to ‘AbdAllah and Amina (parents of prophets), all wombs and
generations the Prophet was present in were of believers.
It is in Tafsir Jumal:
Oh Prophet, whichever believing men and women’s wombs and
generations you passed through from Adam and Hawwa to
’AbdAllah and Amina (parents of prophets), Allah is watching all of them. All of your
ancestors, whether men or women, are believers.
It is in Sawi ‘ala al-Jalalayn:
Sajidin refers to believing people and the verse means that from
Adam to ‘AbdAllah (parents of prophets), whichever wombs and generation of
believers that the Prophet passed through, Allah saw them.
This verse proves that all of his ancestors were believers.
Imam Fakhr al-Din Razi writes:
Almighty Allah says:
Who sees you when you stand up. And your movements among those who prostrate themselves before Allah. This is proof that ancestors of Prophets (parents of prophets) cannot be deniers of Allah.