This paper studies the distributed convex optimization of bipartite containment control problem for a class of higher order nonlinear multi-agent systems with uncertain states. For the optimization problem, the penalty function is constructed by summing the local objective function of each agent and combining the penalty term formed by the adjacency matrix. For the unknown nonlinear function and unpredictable states in the system, this paper construct radial basis function Neural-networks and state observer for approaching, respectively. In order to avoid “explosion of complexity,” under the framework of Lyapunov function theory, we propose the dynamic surface control (DSC) technology and design the distributed adaptive backstepping neural network controller to ensure all the signals remain semi-global uniformly ultimately bounded in the closed-loop system and all agents can converge to the convex hull containing each boundary trajectory as well as its opposite trajectory different in sign. Simulation results confirm the feasibility of the proposed control method.