In this paper, a sliding mode control based on the Jaya algorithm o f phase shift for a two-rotor vibration unit is presented. A two-rotor vibration unit is a highly nonlinear system that has many applications in practical systems. The control problem for this model is to design controllers to ensure phase shift according to the desired value and synchronize the speed of the two rotors. To solve this problem, the authors use the PI controllers for synchronizing the speed of the two rotors and the sliding mode controller for the phase shift. PI control is an effective method to design controllers for practical systems. Besides, Sliding Mode Control (SMC) is one of the most effective methods for designing robust controllers for nonlinear systems affected by external disturbances. However, defining the coefficients of PI controllers and sliding mode controllers is the challenge for researchers. In this study, the Jaya algorithm is used to find the coefficients of these controllers that guarantee the desired phase shift of two rotors, the synchronizing speed of two rotors, and the limitation of control laws. The simulation results are illustrated to show the effectiveness of the proposed method.