A new method is introduced to design sliding mode control with optimally selected sliding surfaces for a class of nonlinear systems. The nonlinear systems are recursively approximated as linear time-varying systems, and corresponding time-varying sliding surfaces are designed for each approximated system so that a given optimization criterion is minimized. The control input, which is designed by using an approximated system, is then applied to the nonlinear system. The method is used to design an autopilot for a missile where the design requirement is to follow a given acceleration command. The sliding surface is selected such that a performance index formed as a function of angle of attack, pitch rate, and velocity error is minimized. It is shown that the response of the approximating sequence of linear time-varying systems converges to the response of the missile.