Optimal consensus control of high-order multi-agent systems (MASs) modeled by multiple integrator-type dynamics is studied. A fully distributed optimal control protocol that achieves the specific consensus behavior is designed for MASs with linear dynamics, where topology-dependent conditions are removed. Further, a distributed consensus protocol for high-order nonlinear MASs with one-sided Lipschitz continuity is presented using the optimization approach, and the optimal solution can be obtained by solving a standard algebraic Riccati equation. Some numerical examples are finally provided to illustrate the effectiveness of the presented approaches.