The paper is devoted to the duality of the Mayer problem for-th order viable differential inclusions with endpoint constraints, whereis an arbitrary natural number. Thus, this paper for constructing the dual problems to viable differential inclusions of any order with endpoint constraints can make a great contribution to the modern development of optimal control theory. For this, using locally conjugate mappings in the form of Euler-Lagrange type inclusions and transversality conditions, sufficient optimality conditions are obtained. It is noteworthy that the Euler-Lagrange type inclusions for both primary and dual problems are 'duality relations'. To demonstrate this approach, some semilinear problems and polyhedral optimization with fourth order differential inclusions are considered. These problems show that sufficient conditions and dual problems can be easily established for problems of a reasonable order.