I entered with Anas upon Hakam, meaning Ibn Ayub, and there were people shooting at a chicken in the governor's house. So Anas said, "The Messenger of Allah ﷺ forbade that animals be tied up and used as targets."
أخبرنا إسمعيل بن مسعود قال حدثنا خالد عن شعبة
دخلت مع أنس على الحكم يعني ابن أيوب فإذا أناس يرمون دجاجة في دار الأمير فقال نهى رسول الله ﷺ أن تصبر البهائم
Muslim narrated it in the Book of Hunting and Slaughtered Animals, chapter on the prohibition against confining animals to be killed, h: 1956, from the hadith of Khalid bin Harith. Bukhari narrated it in the Book of Slaughtered Animals and Hunting, chapter on what is disliked concerning mutilation, confining animals for killing, and making animals crouch to be killed, h: 5513, from the hadith of Shubah, through the same chain. It is also found in Kubra, h: 4528.