It is narrated from Sayyidah Maymunah bint Sa'd (may Allah be pleased with her), the freed slave-woman of the Prophet (peace and blessings be upon him), that the Prophet (peace and blessings be upon him) was asked about a child born of fornication, and He (peace and blessings be upon him) said: "There is no good in him. Two sandals in which I fight in jihad are dearer to me than freeing a child born of fornication."
Hadith Referenceالمعجم الكبير للطبراني / مسند النساء / 21521