In this paper, we study modules having the property that are invariant under some idempotent endomorphisms of its injective envelope. Such modules are called essentially π-injective. It is shown that (1) M is essentially π-injective iff for any essentially finite direct summand X 1 of M and any submodule X 2 of M with X 1 ∩ X 2 = 0 , there exists a direct summand X 0 of M containing X 2 such that M = X 1 ⊕ X 0 , (2) M is essentially π-injective iff M is an ef-extending right R-module and for any decomposition M = M 1 ⊕ M 2 with M 1 essentially finite, M 1 and M 2 are relatively injective, (3) if M is essentially π-injective and R satisfies ACC on right ideals of the form r(m), m ∈ M , then M is a direct sum of uniform submodules. We also describe rings via essentially π-injective modules. It is shown that R is a semisimple artinian ring iff the direct sum of any two essentially π-injective right R-modules is essentially π-injective.