This article investigates distributed optimization of high‐order nonlinear multi‐agent systems (MASs) with disturbance under switching topologies. First, we propose a class of new distributed control algorithms for high‐order MASs under switching topologies, such that all agents asymptotically reach consensus at the unique minimizer of the sum of cost functions. Then, by constructing disturbance observer, the proposed algorithms are extended to address distributed optimization problems for high‐order nonlinear MASs with disturbance under switching topologies. In particular, both of new presented methods do not require optimal reference signal generator, which can save the computational resources of systems. In final, simulations are conducted to validate the theoretical results.