Let A be a unital algebra with a nontrivial idempotent e 1. A map ϕ : A → A is anti-commuting if [ϕ(a), b] = −[a, ϕ(b)] holds for all a, b ∈ A. In this paper, we give a general form of ϕ on A; particularly, if A is prime, then such maps are either central-valued maps or of the forms a → za + f (a) for all a ∈ A, where z is in the center of A and f is a central-valued map.