The Prophet 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