The area of a Microgrid (μG) is a very fast-growing and promising system for overcoming power barriers. This paper examines the impacts of a microgrid system considering Electric Vehicle Grid Integration (EVGI) based on stochastic metaheuristic methods. One of the biggest challenges to slowing down global climate change is the transition to sustainable mobility. Renewable Energy Sources (RESs) integrated with Evs are considered a solution for the power and environmental issues needed to achieve Sustainable Development Goal Seven (SDG7) and Climate Action Goal 13 (CAG13). The aforementioned goals can be achieved by coupling Evs with the utility grid and other RESs using Vehicle-to-Grid (V2G) technology to form a hybrid system. Overloading is a challenge due to the unknown number of loads (unknown number of Evs). Thus, this study helps to establish the system impact of the uncertainties (arrival and departure Evs) by proposing Stochastic Monte Carlo Method (SMCM) to be addressed. The main objective of this research is to size the system configurations using a metaheuristic algorithm and analyze the impact of an uncertain number of Evs on the distribution of residential power in Tripoli-Libya to gain a cost-effective, reliable, and renewable system. The Improved Antlion Optimization (IALO) algorithm is an optimization technique used for determining the optimal number of configurations of the hybrid system considering multiple sources, while the Rule-Based Energy Management Strategy (RB-EMS) controlling algorithm is used to control the flow of power in the electric power system. The sensitivity analysis of the effect parameters has been taken into account to assess the expected impact in the future. The results obtained from the sizing, controlling, and sensitivity analyses are discussed.