Sahih al-Bukhari 2365
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
عُذِّبَتِ امْرَأَةٌ فِي هِرَّةٍ حَبَسَتْهَا، حَتَّى مَاتَتْ جُوعًا، فَدَخَلَتْ فِيهَا النَّارَ ـ قَالَ فَقَالَ وَاللَّهُ أَعْلَمُ ـ لاَ أَنْتِ أَطْعَمْتِهَا وَلاَ سَقَيْتِهَا حِينَ حَبَسْتِيهَا، وَلاَ أَنْتِ أَرْسَلْتِيهَا فَأَكَلَتْ مِنْ خَشَاشِ الأَرْضِ "
Narrated `Abdullah bin `Umar:
Allah's Messenger (ﷺ) said, "A woman was tortured and was put in Hell because of a cat which she had kept locked till it died of hunger." Allah's Messenger (ﷺ) further said, (Allah knows better) Allah said (to the woman), 'You neither fed it nor watered when you locked it up, nor did you set it free to eat the insects of the earth."
Full reference and source
Sahih al-Bukhari 2365 In-book : Book 42, Hadith 13 USC-MSA web (English) : Vol. 3, Book 40, Hadith 553 (deprecated)
View source on Sunnah.com (opens in a new tab)