In this paper, a novel numerical method for solving the optimal control problems (OCPs) are presented. This method uses Genocchi polynomials. Some properties of Genocchi polynomials are given and the operational matrix of derivative is constructed. This matrix helps us to convert the nonlinear constrained optimal control problem to the nonlinear programming one that can be solved by Maple programming software. The presented method is applied on some numerical examples in order to show its advantages.