Abu Hurairah reported,

The Messenger of Allah ﷺ said, "The child born of adultery is the worst of the three."Abu Hurairah said, "For me to lend out a whip for use in the cause of Allah عز وجل is more beloved to me than freeing a child born of adultery."

Abu Dawud 3963

Sahih

حدثنا إبراهيم بن موسى أخبرنا جرير عن سهيل بن أبي صالح عن أبيه

عن أبي هريرة قال

قال رسول الله ﷺ ولد الزنا شر الثلاثة و قال أبو هريرة لأن أمتع بسوط في سبيل الله عز وجل أحب إلي من أن أعتق ولد زنية

أبو داود 3963صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Emancipation of slaves
Chapter
Freeing the child of adultery
Numbering
Darussalam 3963
Abu Dawud 3963