This article explores a guaranteed network connectivity problem during moving obstacle avoidance within a distributed formation tracking framework for uncertain nonlinear multiagent systems with range constraints. We investigate this problem based on a new adaptive distributed design using nonlinear errors and auxiliary signals. Within the detection range, each agent regards other agents and static or dynamic objects as obstacles. The nonlinear error variables for formation tracking and collision avoidance are presented, and the auxiliary signals in formation tracking errors are introduced to maintain network connectivity under the avoidance mechanism. The adaptive formation controllers using command-filtered backstepping are constructed to ensure closed-loop stability with collision avoidance and preserved connectivity. Compared with the previous formation results, the resulting features are as follows: 1) the nonlinear error function for the avoidance mechanism is considered an error variable, and an adaptive tuning mechanism for estimating the dynamic obstacle velocity is derived in a Lyapunov-based control design procedure; 2) network connectivity during dynamic obstacle avoidance is preserved by constructing the auxiliary signals; and 3) owing to neural networks-based compensating variables, the bounding conditions of time derivatives of virtual controllers are not required in the stability analysis.