Let L be a Lie algebra, and Der(L) and IDer(L) be the set of all derivations and inner derivations of L, respectively. Let D be a subalgebra of Der(L) such that it contains IDer(L) and H = ∩α∈DKerα. If DerH(L) denotes the set of all derivations of L whose images are in H, then we give necessary and sufficient conditions under which DerH(L) is equal to some subalgebras of Der(L) for finite dimensional nilpotent Lie algebras.