http://revach.net/article.php?id=4943

Section:  Avodah   Category: Ahavas Yisroel
Parshas Mishpatim: Meshech Chochma - Only Tzaddikim Have Enemies

"Ki Sireh Chamor Sonacha Roveitz Tachas Masao" (Mishpatim 23:5). The Torah commands us to help our enemy when is donkey is suffering from a heavy load. In Parshas Ki Seitzei (22:4) the Torah repeats this mitzva but instead of Sonacha or enemy it says the donkey of your "brother". Why does the Torah change from enemy to brother?

The Shnayim Mikra brings the Meshech Chochma (in Ki Seitzei) that explains that an enemy is someone who you saw do an aveira. Only in this case may you hate someone. However this is only if you yourself are a tzaddik. If you are some way imperfect then rather than hating someone else, you must check your own deeds and improve yourself.

The pasuk in Parshas Mishpatim was before Chait HaEigel and therefore it was possible for one Jew to hate another, since most were perfect. However in Parshas Ki Seitzei after Chait HaEigel very few were perfect and therefore everybody was a brother and not an enemy, no matter what you saw him do.