AbstractIn this article, a distributed time‐varying optimization problem for multirobot systems with collision avoidance is studied. A hierarchical control framework is employed to simplify the complex problem into two subproblems in two layers. One is the network layer where a novel distributed time‐varying finite‐time optimal control protocol as a signal generator is proposed for each robot. The signal generator ignores the model constraint and uncertainty. The other is the real‐time layer, which mainly contains a sampling module and a robust nonlinear model predictive control (NMPC) module. The former samples the optimal signal from the signal generator as a series of sampling tracking points with proper distance to improve tracking performance, and the latter searches for the optimal control protocol for the robot system to track these sampling tracking points in sequence with the model constraint and uncertainty. Furthermore, considering the collision between each robot, a give‐way strategy is designed that the robot with a low priority has to stop to wait for the other with a high priority to move first. And a primary‐secondary judgment technology determines the priorities of robots adaptively according to the current state of the robots. If the way forward of the moving robot is blocked by the stopping one, an auxiliary point is introduced as a temporary transfer station to avoid collision further. Finally, the effectiveness of the proposed methods is verified by a simulation example.