Sheikh Hânî al-Jubayr, judge at the Jeddah Supreme Court
If the fornicator refuses to acknowledge paternity of his child resulting from fornication and does not declare that child to be his son or daughter, then the child will not inherit from the fornicator. This is the ruling in this case, without there being any disagreement among the scholars in this matter.
Such a child resulting from fornication is not a child of the fornicator, does not inherit from him, and will not be attributed to him. However, the child will inherit from his or her mother.
The evidence that the child from fornication will not be attributed to the fornicator is the hadîth where the Prophet (peace be upon him) said: “The child is to be attributed to the one upon whose bed it is born, and for the adulterer there is stoning.” [Sahîh al-Bukhârî (2053) and Sahîh Muslim (1457)]
The meaning is that paternity of a child only comes about as the consequence of a legal marriage. The fornicator does not have such an attribution.
However, if the fornicator decides to attribute the child to himself, then it will be legally his child. Therefore, if the fornicator had declared himself to be the child's father, then the child will have the right to a child's share of the father's estate.
In case there is a dispute regarding a particular child's right to inheritance, then the burden of evidence will be upon the party who asserts the right of a child born of fornication to inherit from the biological father. The party who denies the existence of this right will not be requested to furnish evidence, since the absence of such a right is the default legal assumption.
And Allah knows best.
Source: Islam Today