حَدَّثَنَا يَعْقُوبُ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا مُعْتَمِرٌ، عَنْ سَلْمٍ، - يَعْنِي ابْنَ أَبِي الذَّيَّالِ - حَدَّثَنِي بَعْضُ، أَصْحَابِنَا عَنْ سَعِيدِ بْنِ جُبَيْرٍ، عَنِ ابْنِ عَبَّاسٍ، أَنَّهُ قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ لاَ مُسَاعَاةَ فِي الإِسْلاَمِ مَنْ سَاعَى فِي الْجَاهِلِيَّةِ فَقَدْ لَحِقَ بِعَصَبَتِهِ وَمَنِ ادَّعَى وَلَدًا مِنْ غَيْرِ رِشْدَةٍ فَلاَ يَرِثُ وَلاَ يُورَثُ ‏"‏ ‏.‏
Translation
'Amr b. Shu'aib on his father's authority said that his grandfather reported

If he was a child of a slave-woman whom the father did not possess or of a free woman with whom he had illicit intercourse, he was not joined to the heirs and did not inherit even if the one to whom he was attributed is the one who claimed paternity, since he was a child of fornication whether his mother was free or a slave.