Microgrid optimization scheduling, as a crucial part of smart grid optimization, plays a significant role in reducing energy consumption and environmental pollution. The development goals of microgrids not only aim to meet the basic demands of electricity supply but also to enhance economic benefits and environmental protection. In this regard, a multi-objective optimization scheduling model for microgrids in grid-connected mode is proposed, which comprehensively considers the operational costs and environmental protection costs of microgrid systems. This model also incorporates improvements to the traditional particle swarm optimization (PSO) algorithm by considering inertia factors and particle adaptive mutation, and it utilizes the improved algorithm to solve the optimization model. Simulation results demonstrate that this model can effectively reduce electricity costs for users and environmental pollution, promoting the optimized operation of microgrids and verifying the superior performance of the improved PSO algorithm. After algorithmic improvements, the optimal total cost achieved was CNY 836.23, representing a decrease from the pre-improvement optimal value of CNY 850.