In the name of Allah, the Beneficent, the Merciful
The Prophet (s) taught Muslims to love goodness for all creation, to treat people the way they would love to be treated, and to hate sinful deeds but not the sinners who commit them.
Anas ibn Malik reported: The Prophet, peace and blessings be upon him, said:
لَا يُؤْمِنُ أَحَدُكُمْ حَتَّى يُحِبَّ لِأَخِيهِ أَوْ قَالَ لِجَارِهِ مَا يُحِبُّ لِنَفْسِهِ
None of you has faith until he loves for his brother or his neighbor what he loves for himself.
Source: Sahih Bukhari 13, Grade: Sahih
An-Nawawi commented on this tradition, saying:
الأولى أن يحمل ذلك على عموم الأخوة حتى يشمل الكافر والمسلم فيحب لأخيه الكافر مايحب لنفسه … والمراد بالمحبة إرادة الخير والمنفعة ثم المراد المحبة الدينية لا المحبة البشرية
It is better to interpret this as brotherhood in general, such that it includes the disbeliever and the Muslim. So he should love for his brother, the disbeliever, what he loves for himself… The meaning of love here is an intention for good and benefit, and this meaning is religious love, not human love.
Source: Sharh Arba’een An-Nawawi
Therefore, Muslims have been commanded to love their neighbors as themselves, whether they are Muslims or non-Muslims, righteous or sinful. This involves treating people as if they were our own selves.
Abdullah ibn Amr reported: The Messenger of Allah, peace and blessings be upon him, said:
مَنْ أَحَبَّ أَنْ يُزَحْزَحَ عَنْ النَّارِ وَيَدْخُلَ الْجَنَّةَ فَلْتُدْرِكْهُ مَنِيَّتُهُ وَهُوَ يُؤْمِنُ بِاللَّهِ وَالْيَوْمِ الْآخِرِ وَيَأْتِي إِلَى النَّاسِ مَا يُحِبُّ أَنْ يُؤْتَى إِلَيْهِ
Whoever would love to be delivered from the Hellfire and entered into Paradise, then let him die with faith in Allah and the Last Day, and let him treat the people the way he would love to be treated.
Source: Sahih Muslim 1844 Grade: Sahih
Likewise, Muslims have been warned about hatred, which is a desire to harm others.
Anas ibn Malik reported: The Messenger of Allah, peace and blessings be upon him, said:
لَا تَبَاغَضُوا وَلَا تَحَاسَدُوا وَلَا تَدَابَرُوا وَكُونُوا عِبَادَ اللَّهِ إِخْوَانًا
Do not hate each other, do not envy each other, do not turn away from each other, but rather be servants of Allah as brothers.
Source: Sahih Muslim 2559 Grade: Sahih
Az-Zubair ibn Awwam reported: The Messenger of Allah, peace and blessings be upon him, said:
دَبَّ إِلَيْكُمْ دَاءُ الْأُمَمِ قَبْلَكُمْ الْحَسَدُ وَالْبَغْضَاءُ وَالْبَغْضَاءُ هِيَ الْحَالِقَةُ حَالِقَةُ الدِّينِ لَا حَالِقَةُ الشَّعَرِ وَالَّذِي نَفْسُ مُحَمَّدٍ بِيَدِهِ لَا تُؤْمِنُوا حَتَّى تَحَابُّوا أَفَلَا أُنَبِّئُكُمْ بِشَيْءٍ إِذَا فَعَلْتُمُوهُ تَحَابَبْتُمْ أَفْشُوا السَّلَامَ بَيْنَكُمْ
There has come to you the disease of the nations before you: envy and hatred, and hatred is the razor; it shaves the religion and it does not shave hair. By the one in whose hand is my soul, you will not believe until you love one another. Shall I tell you something which, if you did, you would love each other? Spread peace between yourselves.
Source: Musnad Ahmad 1415 Grade: Sahih
Ibn Hajar wrote in his commentary:
وَلَا يَتِمُّ ذَلِكَ إِلَّا بِتَرْكِ الْحَسَدِ وَالْغِلِّ وَالْحِقْدِ وَالْغِشِّ
Faith is not complete until a Muslim abandons envy, rancor, malice, and fraud.
Source: Fath ul-Bari
Muslims have been taught to hate the evil deeds people commit, but not the people themselves.
وَكَرَّهَ إِلَيْكُمُ الْكُفْرَ وَالْفُسُوقَ وَالْعِصْيَانَ ۚ أُولَٰئِكَ هُمُ الرَّاشِدُونَ
He has made hateful to you unbelief, wickedness, and disobedience; those are the rightly-guided.
Surah Al-Hujurat 49:7
That is, Allah has made a condition of faith the hatred of unbelief (kufr) but not hatred of the unbeliever (kafir). In other words, Muslims hate the sin but not the sinner.
Ibn Rajab reported:
قَالَ بَعْضُ الصَّالِحِينَ مِنَ السَّلَفِ أَهْلُ الْمَحَبَّةِ لِلَّهِ نَظَرُوا بِنُورِ اللَّهِ وَعَطَفُوا عَلَى أَهْلِ مَعَاصِي اللَّهِ مَقَتُوا أَعْمَالَهُمْ وَعَطَفُوا عَلَيْهِمْ لِيُزِيلُوهُمْ بِالْمَوَاعِظِ عَنْ فِعَالِهِمْ وَأَشْفَقُوا عَلَى أَبْدَانِهِمْ مِنَ النَّارِ وَلَا يَكُونُ الْمُؤْمِنُ مُؤْمِنًا حَقًّا حَتَّى يَرْضَى لِلنَّاسِ مَا يَرْضَاهُ لِنَفْسِهِ
Some of the righteous predecessors said: The people who love Allah look by the light of Allah, and they are compassionate with those who disobey Allah. They hate their actions but show mercy to them so that through their admonitions they might leave their actions. They are afraid that the Hellfire will consume their bodies. The believer will not truly be a believer until he is pleased for people to have what he is pleased for himself.
Source: Jami’ Ulum wal-Hikam 13
Abu Qilaba reported: Abu Ad-Darda, may Allah be pleased with him, once came upon a man who was being beaten because of his sin, and they were abusing him. He said, “What do you think if he had fallen into a well, would you not try to rescue him?” They said, “Yes.” He said, “Then do not abuse your brother, and praise Allah who has protected you from sin.” They said, “Do you not hate him?” He said:
إِنَّمَا أُبْغِضُ عَمَلَهُ فَإِذَا تَرَكَهُ فَهُوَ أَخِي
Verily, I only hate his sinful deed, but when he leaves it then he is still my brother.
Source: Hilyat Al-Awliya 793
In fact, the companions of the Prophet asked him how a person can hate for the sake of Allah, and the Prophet responded that true hatred for the sake of Allah is to hate for people what we hate for ourselves; that is, to hate for them to be harmed.
Sahl ibn Mu’adh reported: His father heard from the Messenger of Allah, peace and blessings be upon him:
أَفْضَلُ الْإِيمَانِ أَنْ تُحِبَّ لِلَّهِ وَتُبْغِضَ فِي اللَّهِ وَتُعْمِلَ لِسَانَكَ فِي ذِكْرِ اللَّهِ
The most virtuous faith is to love for the sake of Allah, to hate for the sake of Allah, and to work your tongue in the remembrance of Allah.
Mu’adh said, “How is that, O Messenger of Allah?” He said:
وَأَنْ تُحِبَّ لِلنَّاسِ مَا تُحِبُّ لِنَفْسِكَ وَتَكْرَهَ لَهُمْ مَا تَكْرَهُ لِنَفْسِكَ وَأَنْ تَقُولَ خَيْرًا أَوْ تَصْمُتَ
That you love for the people what you love for yourself, and you hate for the people what you hate for yourself, and that you speak goodness or remain silent.
Source: Musnad Ahmad 21627 Grade: Hasan
Abu Muntafiq reported: He said, “O Messenger of Allah, teach me what will save me from Allah’s punishment and enter me into Paradise.” The Messenger of Allah, peace and blessings be upon him, said:
اعْبُدِ اللَّهَ وَلا تُشْرِكْ بِهِ شَيْئًا وَأَقِمِ الصَّلاةَ الْمَكْتُوبَةَ وَأَدِّ الزَّكَاةَ الْمَفْرُوضَةَ وَحُجَّ وَاعْتَمِرْ وَأَظُنُّهُ قَالَ وَصُمْ رَمَضَانَ وَانْظُرْ مَا تُحِبُّ لِلنَّاسِ أَنْ يَأْتُوهُ إِلَيْكَ فَافْعَلْهُ بِهِمْ وَمَا تَكْرَهُ أَنْ يَأْتُوهُ إِلَيْكَ فَذَرْهُمْ مِنْهُ
Worship Allah and do not associate anything with Him, establish the prescribed prayers, give the obligatory charity, fast the month of Ramadan, and however you love for the people to treat you, then treat them that way, and however you hate for the people to treat you, then do not treat them that way.
Source: Al-Ma’jam Al-Kabeer At-Tabarani 15833 Grade: Hasan
For this reason, Ibn Hajar cites the scholar Al-Kirmani as saying:
وَمِنَ الْإِيمَانِ أَيْضًا أَنْ يُبْغِضَ لِأَخِيهِ مَا يُبْغِضُ لِنَفْسِهِ مِنَ الشَّرِّ
It is part of faith to hate evil for his brother as he hates it for himself.
Source: Fath ul-Bari
In conclusion, a Muslim is taught to desire good and benefit for all people, even the animals. Likewise, a Muslim should never hate a person in the sense of desiring harm for them. Rather, Muslims only hate sinful deeds but not the people who commit them.
Success comes from Allah, and Allah knows best.