In this paper, an optimal discrete-time sliding mode control is proposed for single-input single-output nonlinear systems with input constraints. The sliding surface is designed on the basis of particle swarm optimization algorithm in order to optimize the system response characteristics while ensuring the follow-up of reference model in presence of constraints. Moreover, the controller is developed such that the elimination of chattering phenomenon, the finite-time convergence and the stability of the closedloop system are guaranteed. Performed on an inverted pendulum system, simulation results demonstrate the effectiveness of the proposed approach over the discrete-time sliding mode controller using the saturation function and the discrete-time second order sliding mode controller in terms of fast response.