AbstractThe issue of generation expansion planning in microgrids has become a challenging issue in electricity industry for two reasons: load growth and uncertainties in renewables' generation. Therefore, this issue is considered here. Here, the modelling of generation expansion planning problem has been developed in a network of microgrids in a decentralized manner, considering normal and contingency conditions. On the other hand, in order to further develop the study considered, decentralized generation expansion planning model of microgrids by considering contingency conditions has been addressed in a cooperative approach to minimize total costs. In developed model, investment decisions are made at the higher level and operational constraints has been considered at lower one. Also, case studies are defined in three different scenarios: islanding operation of microgrids as first scenario and peer‐to‐peer trading of microgrids in non‐cooperative and cooperative approaches as second and third scenarios, respectively. The results of simulations have shown that by facilitating the transactions between microgrids, their total costs are reduced. The costs of the whole set of microgrids in the non‐cooperative scenario are reduced by 9.4% compared to the islanding scenario; and the costs are reduced by 7.5% in the cooperative scenario compared to the non‐cooperative scenario.