This paper focuses on the energy management of active distribution network with microgrids for the full use of the coordination and complementarity amongst microgrids. Firstly, combining the hierarchical control theory with the distribution network architecture of multiple microgrids, and taking the optimal coordination of the distribution network as the target, this paper proposes a two-step dynamic hierarchical scheduling strategy. Microgrid scheduling modes are categorized into three types, namely coordinated scheduling, separate grid-connected scheduling and islanding operation, and different modes correspond to different microgrid scheduling strategies. In addition, the dispatching mode could switch reasonably with the mode information sent to the energy management center of the distribution network. Finally, taking the IEEE33 system with four microgrids as an example, the effect of the number of microgrids participating in coordinated dispatching and switching of microgrid dispatching modes on load characteristics and the operation economy are investigated in detail.