The Messenger of Allah ﷺ said, "A woman was punished because of a cat she had confined until it died, and she entered the Fire on account of it. She neither fed it nor gave it water while she kept it locked up, nor did she let it go free to eat from the creatures of the earth."
أن رسول الله ﷺ قال: عذبت امرأة في هرة سجنتها حتى ماتت فدخلت فيها النار، لا هي أطعمتها ولا سقتها، إذ حبستها، ولا هى تركتها تأكل من خشاش الأرض.
Bukhari related it in the Hadiths of the Prophets (3482), and Muslim in Righteousness and Kinship Ties (2242:151), both from Abdullah bin Muhammad bin Asma Dubai, who said, Juwayria bin Asma narrated to us, from Nafi, from Abdullah bin Umar, who mentioned it.