This paper presents an optimal integral sliding mode controller design based on pseudospectral method for overhead crane systems with states and control constraints. At first, through coordinate transformation, the overhead crane system dynamic equation is transformed into a cascaded normal form, and then the cascaded normal form is transformed into an upper-triangular dynamic form. Because integral sliding mode control can neither deal with the problem of states and control constraints nor satisfy minimization of cost function, pseudospectral method is applied as it has a high convergence speed and performs well in solving optimal control problems with non-standard performance index, endpoint conditions and path constraints. Next, in consideration of these advantages, a general form of integral sliding mode integrated by pseudospectral method is presented. So, an optimal integral sliding mode controller is determined. Then, the stability analysis of optimal sliding mode controller is investigated. Finally, some simulations relate to an overhead crane system are performed to show the effectiveness of proposed controller.