In this paper, an optimal sliding mode control method for trajectory tracking of discrete-time systems based on linear quadratic regulator is proposed to improve the trajectory tracking control accuracy and robustness of upper limb rehabilitation robot under the condition of highly nonlinearities, external disturbances, and unmodeled dynamics. Firstly, considering the uncertainty of the mass and moment of inertia of the connecting rod arm of the upper limb rehabilitation robot and the uncertainty of external interference, the dynamic model of the upper limb rehabilitation robot is established by using the Euler Lagrange method, and the linear time-varying state equation of the rehabilitation robot system under the influence of both nonlinear and uncertain factors is derived. Secondly, directing at the chattering problem in sliding mode control, a sliding mode control method based on a new discrete time reaching law is designed to reduce the amplitude of chattering in the control input signal of the upper limb rehabilitation robot system and improve the tracking speed. Furthermore, combined with linear quadratic optimal control, the optimal discrete integral sliding mode control law (LQRSMC) is finally obtained. Meanwhile, for the sake of reducing the influence of the uncertain signal on the system, a robust control law is adopted to estimate and compensate the uncertain interference. The stability of the upper limb rehabilitation robot system is verified by the sliding mode approach condition of the discrete system. Finally, the genetic algorithm is used to further optimize the weighted value, and MATLAB/Simulink is used to simulate the state trajectory of the upper limb rehabilitation robot under various weighted values. The control strategy can not only effectively weaken the trajectory tracking oscillation problem of the upper limb rehabilitation robot, but also overcome the external disturbance and modeling uncertainty, while ensuring the robustness of the rehabilitation robot system.