In the paper minimization of a Lagrange type cost functional over the feasible set of solutions of higher order differential inclusions with endpoint constraints is studied. Our aim is to derive sufficient conditions of optimality for mth-order convex and non-convex differential inclusions. The sufficient conditions of optimality containing the Euler-Lagrange and Hamiltonian type inclusions as a result of endpoint constraints are accompanied by so-called "endpoint" conditions. Here the basic apparatus of locally adjoint mappings is suggested. An application from the calculus of variations is presented and the corresponding Euler-Poisson equation is derived. Moreover, some higher order linear optimal control problems with quadratic cost functional are considered and the corresponding Weierstrass-Pontryagin maximum principle is constructed. Also at the end of the paper some characteristic features of the obtained result are illustrated by example with second order linear differential inclusions.