This paper considers an optimal bipartite formation control problem for high-order nonlinear multiagent systems (MASs) with the consideration of obstacle/collision avoidance. Contrary to existing literature, the control strategy designed in this paper can render the agents in a bipartite formation to complete the obstacle/collision avoidance tasks without requiring the obstacles to be located on the coordinate axis. To save resources, an identifier-critic-actor-based optimized formation control scheme is designed for MASs. An obstacle/collision avoidance approach based on dynamical systems (DS) is designed for high-order nonlinear MASs. Different from the existing related results, the proposed DS-based obstacle/collision avoidance approach can avoid the phenomenon that the control quantities approach infinity near obstacles or other agents, and eliminate the dependence on global information. Finally, a simulation example is given to validate the proposed control method.