In this paper we present a distributed control method for minimizing the operation cost in DC microgrid based on multiagent system. Each agent is autonomous and controls the local converter in a hierarchical way through droop control, voltage scheduling and collective decision making. The collective decision for the whole system is made by proposed incremental cost consensus, and only nearest-neighbor communication is needed. The convergence characteristics of the consensus algorithm are analyzed considering different communication topologies and control parameters. Case studies verified the proposed method by comparing it without traditional methods. The robustness of system is tested under different communication latency and plug and play operation.