Microgrids mainly use conventional and renewable energy resources at the same time. Conventional energy resources produce environmental pollution and need high cost for operation. In recent years, penetration of renewable resources such as photovoltaic and wind turbine has been rapidly grown in microgrids. Reduction of power losses and pollution are the main advantages of integrating renewable resources into networks. But, the renewable energy resources comprise low inertia and stability of the network integrated with such units is low. As a result, the environmental pollution and stability of microgrid are considered as the main problems and a new modeling of microgrid energy management is proposed by this paper to tackle such drawbacks. In this regard, environmental pollution is reduced by including hydrogen gas station and carbon capture-storage system. As well, the virtual synchronous generator is used to provide sufficient inertia and improving transient stability. The uncertain parameters are incorporated in the planning and stochastic programming is applied to tackle such uncertainties. Problem is mathematically expressed as a stochastic mixed integer linear programming and solved by the augmented Epsilon-constraint method. Finally, a comprehensive sensitivity analysis is carried out to evaluate the results. Based on the simulation results, by installing carbon capture-storage system, operational cost of microgrid is reduced from 64.998 $ to 56.043 $ and 1791.75 kg of carbon dioxide is stored. The revenue equal to 24 $ in one day is achieved by H2 station without any pollution. The stability of microgrid is also significantly improved by installing virtual synchronous generator. The results demonstrate the viability and effectiveness of the proposed method to minimize environmental pollution, operation cost and frequency fluctuations in microgrid energy management.