Abdullah bin Umar reported,

Ibn Umar entered the home of Yahya bin Saeed and found a young boy from the family of Yahya who had tied up a hen and was shooting at it. Ibn Umar walked over to the hen, untied it, and brought it back along with the boy. He said, "Restrain your boy from tying up this bird to be killed in this manner, for I heard the Prophet ﷺ forbid that any animal or other creature be confined and shot at as a target."

Bukhari 5514

Sahih

حدثنا أحمد بن يعقوب أخبرنا إسحاق بن سعيد بن عمرو عن أبيه أنه سمعه يحدث

عن ابن عمر رضي الله عنهما

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

البخاري 5514صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Slaughter and hunting
Chapter
What is disliked regarding mutilation, animals killed by restraint, and animals used as targets
Numbering
Darussalam 5514
Bukhari 5514