You shall love your God (Deuteronomy 6:5).
You shall fear your God (Leviticus 19:14).
Love and fear of the same subject are obviously incompatible emotions. Love implies a desire to be close to the loved one, while fear is associated with the desire to be more remote from the object of one's fear. How does the Torah expect a person to relate to God in both ways simultaneously?
Rabbi Schneur Zalman explains in Tanya that when one fulfills the Divine will, one is drawn closer to God, and that when one transgresses the Divine will, one detaches oneself from God. Inasmuch as a person is constantly tempted by the yetzer hara to flout the Divine will, one should fear succumbing to the yetzer hara because one would thereby lose the closeness to God. Thus, fear of God is not a fear of being punished, but a fear of losing one's relationship with the object of one's love, and this fear is perfectly compatible with love of God.
In a love relationship between two people, it is easily understood that one would not wish to offend the beloved person in any way, even though there is no fear of punishment. We can develop a loving relationship with God that will result in a similar type of fear, the fear of offending Him. The Talmud tells us that one can never be certain that one will never sin, and, given the human frailty to temptation and the constant incitement by the yetzer hara, we can understand why one should always have this type of fear of God, for it is a fear that is perfectly compatible with love.