Microgrids (MGs) are playing an important role in the maximum utilization of distributed energy resources. The optimal economic operation and low-carbon electricity generation can enhance MGs effectiveness. This paper presents the results of a solar-photovoltaic (PV)-driven islanded MG's technoeconomic optimization analysis and environmental life-cycle assessment (LCA) to achieve economical and environmentally superior performance. A net present cost (NPC)-based simulation for optimal sizing of the MG is proposed. A novel life-cycle inventory (LCI) is developed to evaluate the impacts of the MG under 21 midpoint indicators and three endpoint indicators by the ReCiPe 2016 method, metal particle releases by the Ecopoints approach, and the greenhouse-gas emissions by the IPCC method. The sensitivity analysis is carried out to verify the effects for three different batteries and five different PV modules for all of the considered impact indicators. The results reveal that the proposed MG offers a revenue of 29,520 US$/yr by routing excess energy to neighbors after fulfilling the prosumers' demand at an optimal net present cost of 364,906 US$. Furthermore, the outcomes obtained from the LCA analysis show that, among the MG components, batteries have the highest impact on human health (74%) and the ecosystem (78%) due to greater greenhouse-gas emissions (CO 2 -48%, CH 4 -37%, and N 2 0-48%).INDEX TERMS Microgrid, optimal design, life-cycle assessment, environmental impact, greenhouse-gas.