It is noteworthy that Islamic message is mercy for all; this mercy is not confined to Muslims. Moreover, it’s to be stressed that Islamic mercy extends also to all creatures. This is confirmed by the fact the Prophet of Islam, Muhammad, peace and blessings be upon him, was sent as a mercy to all creatures (the Qur’an: Al-Anbiyah: 114). However, whether it is permissible or not to keep some kinds of animals or birds as pets is an issue which needs more legal clarification.
Sheikh M. S. Al-Munajjid, a prominent Saudi Muslim lecturer and author, states: “There is nothing wrong about keeping animals for which there is no Islamic prohibition. There are reports in the Sunnah which indicate that some of the Sahabah (Companions of the Prophet) kept permissible animals for farming purposes or for fun and for pleasure.
It was narrated from Anas, may Allah be pleased with him, that he had a young brother who had a small bird or nightingale (called Nughayr). The bird died, and the Prophet, peace and blessings be upon him, upon seeing him wrapped up in sadness and grief, said to him jokingly these words that imply approval of his keeping this bird: “O Abu Umayr, what happened to the Nughayr?”. And the Prophet, peace and blessings be upon him, told us that “A woman was deemed to enter the Fire because of a cat. She imprisoned her and neither fed her nor set her free to eat the rodents of the earth.” From this it may be understood that if she had fed it, she would have been saved from that threat. And it was said that Abu Hurayrah was so called because of a cat (Arabic hirr, dim. hurayrah) which used to accompany him.
So, keeping permissible animals, so long as one does not neglect them, is something permitted and it may even be one of the means of earning reward, as the Prophet, peace and blessings be upon him, said, “In every living being there is reward.” But if you keep animals and neglect or abuse them, it may be one of the means that lead to sin and the threat of entering Hell, as indicated by the previous mentioned Hadith on the woman who tied a cat to death.
We would also point out that care and concern for human beings should take precedence over the care of animals, and that the reward for that is greater. The Prophet, peace and blessings be upon him, said: “Ward off the Fire even with half a date [i.e., by giving half a date in charity]” and “I and the one who sponsors an orphan will be like these two in Paradise” – and he gestured with his index and middle fingers.
On this basis, there is nothing wrong with a muslim keeping fish, so long as you take care of them and avoiding anything that could cause their death.”