With the proposal of the carbon peaking and carbon neutrality goals, the number of electric vehicles is increasing day by day. Besides, the insufficient number of charging piles leads to the increase of the queuing time of electric vehicles, the pricing of aggregators and other issues becoming increasingly prominent. To solve the above problems, the aggregator pricing method of two-stage charging station allocation for electric vehicles is proposed. First, the contract signing mode between aggregators and electric vehicles is divided into three categories: complete dispatching, rolling reward and punishment mechanism dispatching, and free dispatching. Considering the impact of external factors on the energy consumption of electric vehicles, a road network model is established. Then, the improved A-star algorithm is used to solve the shortest path, in which the time factor is introduced into the evaluation function of A-star algorithm. At the same time, the evaluation function is improved according to traffic energy consumption, uninterrupted driving time, traffic light waiting time and other factors. The aggregator obtains the attraction of the charging station to the electric vehicle based on the charging and discharging demand of the electric vehicle and the Coulomb’s law, and then establishes the grid aggregator electric vehicle supply chain, and conducts reasonable pricing and charging station allocation in two stages. Finally, an example shows that this scheme can significantly improve the peak shaving efficiency, improve the profits of aggregators, and reduce the queuing time and traffic energy consumption of electric vehicles in terms of the distribution of electric vehicle charging stations and the pricing of aggregators.