The proportional-derivative sliding-mode control will be designed and tuned in the trajectory tracking of a robot manipulator which operates on uncertain dynamic environments. For achieving these goals, first, a linear matrix inequality–based framework is suggested to design a robust proportional-derivative sliding-mode control in the presence of external disturbances. Next, the parameters of the proportional-derivative sliding-mode control law will be tuned via another minimization problem subjected to some linear matrix inequality constraints. Thus, the controller parameters can be automatically updated via the solution of the optimization problem. The results are successfully used in the robot manipulator with considering two reference paths and some different loads. The simulation results show the effectiveness of the proposed method in comparison with the same technique.