Some of the People of Knowledge have allowed killing a dog if its impurity is a lot.
Imam Ibn Muflih rahimahullah said:
أَنَّهَا إذَا آذَتْ بِكَثْرَةِ نَجَاسَتِهَا وَأَكْلِهَا مَا غَفَلَ عَنْهُ النَّاسُ جَازَ قَتْلُهَا عَلَى مَا يَأْتِي نَصَّ أَحْمَدُ فِي النَّمْلِ يَقْتُلهُ إذَا آذَاهُ مَعَ أَنَّ الشَّارِعَ نَهَى عَنْ قَتْلِهَا فَمَا جَازَ فِي أَحَدِهِمَا جَازَ فِي الْآخَرِ، بَلْ النَّهْيُ عَنْ قَتْلِ النَّمْلِ وَنَحْوِهِ آكَدُ لِأَنَّهُ لَمْ يَتَقَدَّمْهُ أَمْرٌ بِقَتْلِهِ وَلَمْ يُرَ صَحَابِيٌّ قَتَلَهُ كَمَا فِي الْكِلَابِ
“If it [the dog] harms due to a lot of impurity and eating what the people are heedless about, then it is permissible to kill it according to what came from Ahmad about killing an ant if it harms. This is along with the prohibition of the Legislator (Allah) in regards to killing them. So what is permissible for one of them is permissible for the other. Rather, the prohibition of killing an ant and the likes is emphasized because there has not been an order earlier [in the Shairah] to kill them nor did a Companion radillahu anhu take the opinion that you can kill them as comes from one Companion in regards to killing dogs…”
[Adaab as-Shari’ah (3/356)]
So based on that, if the dog in your house is causing trouble due to a lot of impurity, it would be allowed to kill it inshallah because it harms.
Otherwise, the Scholars mention that it is not allowed to kill an animal because of sickness or pain it is experiences unless this animal is one that will be eaten and is allowed to be eaten. This is because it is considered wasting wealth to just kill an animal without benefiting from it. [See here]
Also, if an animal is harmful to humans, then it is allowed to slaughter it to protect against its harm [See here].
And Allah knows best
Answered by
Faisal Ibn Abdul Qaadir Ibn Hassan
Abu Sulaymaan