إِنَّ أَحَبَّ الْأَعْمَالِ إِلَى اللَّهِ تَعَالَى الْحُبُّ فِي اللَّهِ وَالْبُغْضُ فِي اللَّهِ
Among the deeds most beloved to Allah Most High are loving for Allah’s sake and disapproving for Allah’s sake.
Source: أحمد وأبو داود
أَحَبَّ الْأَعْمَالِ means “the most beloved deeds.” الْحُبُّ فِي اللَّهِ is loving for Allah’s sake; الْبُغْضُ فِي اللَّهِ is disapproving wrongdoing for Allah’s sake. This does not legitimize personal envy, cruelty, or injustice.
أَحَبَّ is an elative form, “most beloved.” الْأَعْمَالِ is plural of عَمَل. Repeating فِي اللَّهِ emphasizes that the purpose in both attitudes is the same.
Appreciating a friend’s virtues while kindly opposing their error fits this teaching; humiliating or depriving them of their rights does not.