We discuss the existence of optimal controls for a Lagrange problem of systems governed by the second-order nonlinear impulsive differential equations in infinite dimensional spaces. We apply a direct approach to derive the maximum principle for the problem at hand. An example is also presented to demonstrate the theory.