Balaam arose in the morning, saddled his she-donkey, and went with the Moabite dignitaries.
He hoped to demonstrate how the Jews had repeatedly been eager to rebel against G-d and make G-d judge unfavorably.
Bemidbar 22:21
When a person sins, he augments the power of evil in the world. This can happen in two ways:
When a person indulges in some material or sensual pleasure that is permitted by the Torah but partakes in it for selfish motivations, he augments the power of "neutral evil" (kelipat nogah). He makes the world a coarser, less Divinely-oriented place, but does not increase the spirit of antagonism against Divinity in it. To redeem the power he invested in this form of evil and re-root it in holiness, it is enough for the person to regret and repent of having selfishly indulged in G-d's gifts.
When a person transgresses one of the Torah's
explicit prohibitions, he augments the power of the three varieties of "pure evil" (the kelipot temei'ot). In this case, the person increases the world's enmity toward Divinity, increasing the world's conscious and unconscious hostility to G-d's intents and purposes. To redeem the power he diverted into this form of evil, the person must motivate his return to G-d with ardent, overpowering love.
Balaam's exceeding hatred and antagonism toward G-d may be seen as an allegory for the evil produced by deliberate transgressions of the Torah's prohibitions. Abraham's exceeding love of G-d and enthusiasm in performing His will is then an allegory for the antidote to this poison: repentance and reorientation (teshuvah) toward G-d motivated by love.
Here, at the beginning of Balaam's journey to curse the Israelites, G-d tells him that he is doomed to fail, for the people have inherited from Abraham the power to transform the results of hatred for G-d into holiness.
Similarly, whenever we find ourselves having to repair the damage we might have caused by having deliberately disregarded G-d's will, the surest way to make amends for such misdeeds is to bolster our love for Him. This love will in turn transform past misdeeds into the motivation for doing good deeds. Just as G-d transformed Balaam's curses into blessings, we too can always transform "curses" into blessings.
--Kehot's Chumash
Bemidbar