In this paper, an efficient method for solving optimal control problems of the linear differential systems with inequality constraint is proposed. By using new adjustment of hat basis functions and their operational matrices of integration, optimal control problem is reduced to an optimiza- tion problem. Also, the error analysis of the proposed method is investigated and it is proved that the order of convergence is O(h4). Finally, numerical examples affirm the efficiency of the proposed method.