Is It Haram to Kill Rats?
Question

What is the ruling on killing mice and rats?
Praise be to Allah.Is it haram to kill rats?
There is nothing wrong with killing mice and rats. `Abd-Allah ibn ‘Umar (may Allah be pleased with them both) narrated that Hafsah said: the Messenger of Allah (peace and blessings of Allah be upon him) said:
“There are five animals for which there is no blame on the one who kills them: crows, kites (hawk-like birds), mice/rats, scorpions and mad dogs.” (Narrated by al-Bukhari, 1828)
(Translators’ note: the Arabic word farah may refer to rats or mice, so both are mentioned in the translation.)
Al-Qasim ibn Muhammad said: I heard ‘Aishah, the wife of the Prophet (peace and blessings of Allah be upon him), say: I heard the Messenger of Allah (peace and blessings of Allah be upon him) say:
“There are four things which are fasiq (corrupt) and may be killed at all times, whether one is in a state of ihram [for Hajj and ‘Umrah] or not: kites, crows, mice/rats and mad dogs.” (Narrated by Muslim, 1198)
Are mice and rats harmful?
Mice and rats are harmful creatures, as the Prophet (peace and blessings of Allah be upon him) explained:
Ibn 'Abbas said: “A mouse (or rat) came and started dragging the wick (of the lamp). It threw it in front of the Messenger of Allah (peace and blessings of Allah be upon him), onto the mat on which he was sitting, and it burnt a hole the size of a dirham. He said, “When you go to sleep, extinguish your lamps, for the Shaytan will tell creatures like this to do something like this so that you will be burned.” (Narrated by Abu Dawud, 5427)
The mice or rats that may live in people’s houses are among the harmful creatures or vermin (fuwaysiqah) which the Prophet (peace and blessings of Allah be upon him) commanded us to kill in all situations, whether we are in ihram or not. 
The root of the word fuwaysiqah (fasaqah) means to deviate from the right way and to do harm; hence a sinner is described as “fasiq”, and these animals are called fawasiq, as a metaphor for their evil nature; or it was said that it is because it is not haram to kill them, whether one is in ihram or not, for they have no sanctity or protection in any circumstances. Al-Tahawi narrated in Ahkam al-Quran with his isnad from Yazid ibn Abu Nu’aym that he [Yazid] asked Abu Sa’id al-Khudri why mice/rats were called fuwaysiqah. He said: the Prophet (peace and blessings of Allah be upon him) woke up one night and saw that a mouse/rat had taken the wick of the lamp to burn down the house of the Messenger of Allah (peace and blessings of Allah be upon him), so he got up and killed it, and said that it was permissible to kill them whether one is in ihram or not. This was mentioned by al-‘Allamah al-Dumayri.
Al-Bukhari and Muslim narrated in their Sahihs that Abu Musa al-Ash’ari said: A house in Madinah burned down with its people inside. When the Messenger of Allah (peace and blessings of Allah be upon him) heard about this, he said:
“This fire is an enemy to you, so when you go to sleep, extinguish it.”
Al-Bukhari narrated that Jabir ibn ‘Abd-Allah said: the Messenger of Allah (peace and blessings of Allah be upon him) said:
“Cover the vessels, for the mouse/rat may drag out the wick (of the lamp) and burn the occupants of the house.”
Something similar was narrated by Muslim, in which he says: “For the fuwaysiqah may start a fire and burn the house and its occupants.”
Al-Tabari said, explaining these ahadith: if a person wants to spend the night in a house in which there is no one else, and in which there is a fire or a lamp, it is a duty on him to extinguish it before he sleeps… The hadith was narrated by al-Hakim; he said its isnad is sahih. (‘Awn al-Ma’bud Sharh Abi Dawud)
For more, please see these answers: 7004 , 10498 , 169562 and 336476  
And Allah knows best.