We provide a condition for a 2-Killing vector field on a compact Riemannian manifold to be Killing and apply the result to doubly warped product manifolds. We establish a connection between the property of a vector field on a doubly warped product manifold and its components on the factor manifolds to be Killing or 2-Killing. We also prove that a Killing vector field on the doubly warped product gives rise to a Ricci soliton factor manifold if and only if it is an Einstein manifold. If a component of a Killing vector field on the doubly warped product is of a gradient type, then, under certain conditions, the corresponding factor manifold is isometric to the Euclidean space. Moreover, we provide necessary and sufficient conditions for a doubly warped product to reduce to a direct product. As applications, we characterize the 2-Killing vector fields on the doubly warped spacetimes, particularly on the standard static spacetime and on the generalized Robertson–Walker spacetime.