Considering that the charging behaviors of users of electric vehicles (EVs) (including charging time and charging location) are random and uncertain and that the disorderly charging of EVs brings new challenges to the power grid, this paper proposes an optimal electricity pricing strategy for EVs based on region division and time division. Firstly, by comparing the number of EVs and charging stations in different districts of a city, the demand ratio of charging stations per unit is calculated. Secondly, according to the demand price function and the principle of profit maximization, the charging price between different districts of a city is optimized to guide users to charge in districts with more abundant charging stations. Then, based on the results of the zonal pricing strategy, the time-of-use (TOU) pricing strategy in different districts is discussed. In the TOU pricing model, consumer satisfaction, the profit of power grid enterprises, and the load variance of the power grid are considered comprehensively. Taking the optimization of the comprehensive index as the objective function, the TOU pricing optimization model of EVs is constructed. Finally, the nondominated sorting genetic algorithm (NSGA-II) is introduced to solve the above optimization problems. The specific data of EVs in a municipality directly under the Central Government are taken as examples for this analysis. The empirical results demonstrate that the peak-to-valley ratio of a certain day in the city is reduced from 56.8% to 43% by using the optimal pricing strategy, which further smooth the load curve and alleviates the impact of load fluctuation. To a certain extent, the problem caused by the uneven distribution of electric vehicles and charging stations has been optimized. An orderly and reasonable electricity pricing strategy can guide users to adjust charging habits, to ensure grid security, and to ensure the economic benefits of all parties.