All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
The illegitimate child is, like other people, competent person obligated to observe religious duties (if he is sane and adult) and he will be held accountable for his own deeds. If he does righteous deeds, he will be rewarded; otherwise, he will deserve punishment. Claiming that an illegitimate child will not enter Paradise is totally unfounded. The Hadeeth, which is attributed to the Prophet, sallallaahu ‘alayhi wa sallam, saying: "The illegitimate child will not enter Paradise", is classified by many scholars as a Mawdhoo’ (fabricated) Hadeeth. Indeed, his parents, not him, are the ones held guilty for their committing Zina (adultery or fornication). Allaah The Almighty Says (what means): {And no bearer of burdens will bear the burden of another.}[Quran 17:15] For further information, refer to Fatwa 88469.
Allaah Knows best.