Answer by Monthly Al-Sunnah, Jhelum
The use of insect killers to eliminate mosquitoes is prohibited (haram) because mosquitoes get stuck in it and burn, and burning any living creature is not permissible in Islam.
Islamic Evidence Against Burning Living Beings
① Narration of Sayyiduna Hamza Al-Aslami (رضي الله عنه):
The Prophet Muhammad (ﷺ) said:
"Fire punishment can only be given by the Lord of Fire (Allah)."
[Sunan Sa‘id bin Mansur: 2643, Musnad Ahmad: 3/494, Sunan Abi Dawood: 2673]
Hafiz Ibn Hajar (رحمه الله) has classified its chain as "Sahih" (authentic).
[Fath al-Bari: 6/149]
② Narration of Sayyiduna Abu Huraira (رضي الله عنه):
The Prophet Muhammad (ﷺ) said:
"None can punish with fire except Allah."
[Sahih al-Bukhari: 3016]
③ Narration of Sayyiduna Abdullah bin Abbas (رضي الله عنهما):
The Prophet Muhammad (ﷺ) said:
"Do not punish with the punishment of Allah (i.e., fire)."
[Sahih al-Bukhari: 3017]