To improve the utilization efficiency and operational stability of distributed power sources in microgrids, this article explores the optimization configuration problem of distributed power sources in microgrids through multi scenario analysis techniques and optimization configuration model design methods. Research suggests that through reasonable selection of distributed power sources, capacity configuration, and dual layer planning model design, the economy and reliability of microgrids can be significantly improved. Meanwhile, optimizing configuration strategies can address the volatility and uncertainty of distributed power sources, providing theoretical support and practical guidance for the efficient application of distributed power sources in microgrids.