With the advent of smart grid theory, distribution networks can include different microgrids (MGs). Therefore, to achieve the desired technical and economic objectives in these networks, there is a need for bilateral coordination between their operators. In the following, by defining an energy management problem for them, it is predicted that the mentioned goals can be achieved. Therefore, this paper presents the hybrid flexible-securable operation (HFSO) of a smart distribution network (SDN) with grid-connected multi-microgrids using a two-layer coordinated energy management strategy. In the first layer, the microgrid (MG) operator is coordinated with sources, storages, and demand response operators. This layer models the HFSO method in the grid-connected MGs, which is based on minimizing the difference between the sum of operating cost of nonrenewable distributed generations and cost of energy received from the SDN, and the sum of flexibility and security benefits. It is constrained to AC optimal power flow, flexibility and voltage security constraints, operation model of sources and storages, and demand response. The second layer concerns coordination between the MG operators and the SDN operator. Its formulation is the same as that of the first layer, except that the HFSO model is used in the SDN according to MGs power daily data obtained from the first layer problem. The strategy converts the mixed-integer nonlinear programming to linear one to obtain the optimal solution with low calculation time and error. Moreover, stochastic programming models the uncertainties of load, energy price, and renewable power. Eventually, numerical results confirm the capability of the scheme to improve technical and economic indices simultaneously. As a result, by expecting the optimal operation for sources, storage, and responsive loads, it succeeded to enhance energy loss, voltage profile, and voltage security of the mentioned networks by up to 30%, 22%, and 5%, respectively, compared to power flow studies. In addition, there was enhancement in economic and flexibility status of the SDN and MGs.