Ever-growing mobility and traffic congestion within urban areas make the need for a sustainable form of transport inevitable. Traffic congestion has a significant effect on the amount of energy consumption of a vehicle and, as a result, on its associated environmental impacts. Any decision-making regarding structuring a fleet without taking into account the traffic congestion level (TCL) will lead to a less sustainable fleet with higher environmental and economic costs. To address this issue, this study examines the effects of the traffic congestion intensity level on the fleet structure of an urban car-sharing company over a certain planning period. We present a new optimization framework for finding an optimal vehicle composition of the fleet of an urban car-sharing company considering the energy consumption of vehicles at different traffic congestion levels. The results show that electric vehicles (EVs) are more competitive than diesel vehicles (DVs) in high-peak traffic congestion from the outset of the planning period. In addition, we perform a sensitivity analysis to take into account the effects of specific uncertain parameters such as the energy and purchasing costs of EVs on the total cost of ownership. As expected, the purchasing price of EVs, energy prices of DVs, and increase in diesel prices have the highest impact on the total cost.