This paper concentrates on the solution of state feedback exact linearization zero steady-state error optimal control problem for nonlinear systems affected by external disturbances. Firstly, the nonlinear system model with external disturbances is converted to quasi-linear system model by differential homeomorphism. Using Internal Model Optional Control (IMOC), the disturbances compensator is designed, which exactly offset the impact of external disturbances on the system. Taking the system and the disturbances compensator in series, a new augmented system is obtained. Then the zero steady-state error optimal control problem is transformed into the optimal regulator design problem of an augmented system, and the optimal static error feedback control law is designed according to the different quadratic performance index. At last, the simulation results show the effectiveness of the method.