In this article, the neural network adaptive formation control of a class of second-order nonlinear systems with unmodeled dynamics is investigated, where the control law merely depends on the relative bearings between neighboring agents. First of all, the radial basis neural network is introduced to approximate unknown nonlinear dynamics, and the adaptive estimation is used to eliminate the effect of the approximation errors and the bounded disturbance. Furthermore, the negative gradient method is proposed to optimize the multi-agent systems to the desired formation shape, and the backstepping method is introduced to design the bearing-only formation control law. And then, the global stability of the bearing-only neural network formation system is proved using the Barbalat's lemma. Finally, the simulation results illustrate the effectiveness of the proposed formation control algorithm.