The use of distributed energy systems (DES) can utilize local resources to achieve flexible and efficient energy production and supply. However, this aspect of pollutant emission reduction has not been sufficiently investigated in current related studies. On this basis, this study establishes a DES system that integrates a ground-source heat pump, a gas turbine, a photovoltaic device and an energy storage device. An Improved Zebra Optimization Algorithm (IZOA) is proposed for optimizing the capacity of DES devices and the energy supply ratio of the ground-source heat pump. Using the economic cost saving rate (ECSR), pollutant emission reduction rate (PERR) and energy saving rate (ESR) as the optimization objectives, the study builds a DES configuration optimization model. By analyzing the arithmetic example of a large hotel building, the study verifies the effectiveness of the IZOA algorithm in solving the DES configuration optimization problem. This study provides useful research ideas in promoting the development of distributed energy systems, environmental protection and energy conservation.