We apply elementary matrix computations and the theory of differential identities to prove the following: let R be a prime ring with extended centroid C and L a noncommutative Lie ideal of R. Suppose that f : L → R is a map and g is a generalized derivation of R such that [f(x), g(y)] = [x, y] for all x, y L. Then there exist a nonzero α C and a map μ : L → C such that g(x) = αx for all x R and f(x) = α−1 x + μ(x) for all x L, except when R M 2(F), the 2 × 2 matrix ring over a field F.