Let R be a unital prime ring with characteristic not 2 and containing a nontrivial idempotent P and ϕ be an additive map on R satisfying ϕ([[A, B], C]) = [[ϕ(A), B], C] = [[A, ϕ(B)], C], for any A, B, C ∈ R whenever AB = 0. In this paper, we study the structure of ϕ and prove that ϕ on R is proper, i.e. has the form ϕ(A) = λA + h(A), where λ ∈ Z(R) and h is an additive map into its center vanishing at second commutators [[A, B], C] with AB = 0. As an application of our results, we characterize generalized Lie triple derivations on R. The obtained results are applied to Banach space standard operator algebras and factor von Neumann algebras, which generalize some known results.