This paper discusses the design of distributed control gains for consensus in multi-agent systems with second-order nonlinear dynamics. First, an effective distributed adaptive gain-design strategy is proposed based only on local information of the network structure. Then, a leader–follower consensus problem in multi-agent systems with updated control gains is studied. A distributed adaptive law is then proposed for each follower based on local information of neighboring agents and the leader if this follower is an informed agent. Furthermore, a distributed leader–follower consensus problem in multi-agent systems with unknown nonlinear dynamics is investigated by combining the variable structure approach and the adaptive method. Finally, simulation examples are given to illustrate the theoretical analysis.