“Know that Allah’s Messenger is among you. Were he to follow you in many an affair, you yourselves would suffer. But Allah has endeared faith to you and has embellished it in your hearts, and has made unbelief and evil-doing and disobedience abhorrent to you. Such are those who are rightly guided.”
(The Qur’ān – 49:7)
Allah’s Prophet ﷺ was hesitant to take any military action against the Bani al-Mustaliq on the report given by Walid bin Uqbah. But some of the people insisted that they should be attacked at once. At this those people were warned that they should not forget that the Prophet ﷺ was present among them, who understood them (Bani al-Mustaliq) better than they did. Therefore, their thinking that the Prophet ﷺ should act according to their counsel in important matters was misplaced boldness. For if he started acting according to what they counselled, it would generally lead to blunders for which they themselves would have to suffer.
The message here is that we should hate sinful deeds, but we should not hate the sinners themselves. For, Allah has made it a condition of faith to hate evil deeds, but He does not command us to hate the people who do them. This places our hatred towards the abstract evil in a constructive manner so as to avoid harming people. The righteous predecessors would make such a distinction between the deed and the doer.
Thus Allah has warned us about the destructive effects of hatred on the heart as it leads to injustice if left unchecked.