AbstractThe occurrence of natural disasters can disrupt the normal functioning of distribution networks. In this situation, the activeness of distribution networks in the sense of benefiting from energy sources and related structures such as microgrids (MGs) makes them benefit from the capability of structures such as MGs, in case of High‐Impact Low‐Probability (HILP) events, so that consumers are able to disconnect from main grid and trade with other MGs. Thus, the energy management of networked MGs needs a new operation structure to encourage them providing each other with the required energy by creating the necessary incentives. This paper presents a novel cooperative framework aimed at enhancing the resilience of MGs through the establishment of peer‐to‐peer (P2P) energy trading among their constituents. In the present model, MGs engage in energy transactions with one another, aiming to minimize costs through the cooperative operation of networked MGs. The utilization of the suggested model enables MGs to enhance network resilience within the framework of peer‐to‐peer energy transactions, while also achieving cost reductions in comparison to islanding and non‐cooperative operation. The numerical results obtained demonstrate the efficacy of the proposed methodology in enhancing the resilience of MGs and mitigating their operational expenses.