Aiming at the problems of low efficiency and poor reliability in fault recovery of existing DG containing distribution networks, a multi-layer modeling method is proposed for fault recovery of DG containing distribution networks. The upper level model establishes an island partitioning model based on load level and controllability, and solves the model by combining generalized first search method and depth first search method. The lower level model aims to establish a main grid power recovery model with the minimum network loss, total power loss, minimum switching actions, and voltage offset as the objectives, the model is solved by combining the improved binary particle swarm optimization algorithm and the improved whale algorithm. Verify its superiority through numerical examples. The results indicate that, proposed method has good results in fault recovery of distribution networks containing DG, which can more reliably and efficiently restore faulty power supply, reduce network losses after reconstruction and improve power quality on the basis of completing fault recovery.