Today, automatic diving robots are used for research, inspection, and maintenance, extensively. Control of autonomous underwater robots (AUVs) is challenging due to their nonlinear dynamics, uncertain models, and the system underactuation. Data collection using underwater robots is increasing within the oceanographic research community. Also, the ability to navigate and cooperate in a group of robots has many advantages compared with individual navigations. Among them, the effectiveness of using resources, the possibility of robots’ collaboration, increasing reliability, and robustness to defects can be pointed out. In this paper, the formation control of underwater robots has been studied. First, the kinematic model of the AUV is presented. Next, a novel Lyapunov-based tracking control algorithm is investigated for the leader robot. Subsequently, a control law is designed using Lyapunov theory and feedback linearization techniques to navigate a group of follower robots in a desired formation associated with the leader and follow it simultaneously. In the obtained results for different reference paths and various formations, the effectiveness of the proposed algorithm is represented.