In recent years, electric vehicles (EVs) have increased considerably in the logistics sector with the implementation of greenhouse gas (GHG) emission regulations. However, the driving range of EVs is limited by the battery capacity compared to combustion engine vehicles. This study proposes a public charging infrastructure localization and route planning strategy for logistics companies based on a bilevel program. A two-phase heuristic approach combining a two-layer genetic algorithm (TLGA) and simulated annealing (SA) is presented to solve the problem. The hybrid method uses TLGA to derive the optimal routing and charging plan and the SA descent algorithm is used to select the charging station (CS) locations. The proposed method is tested and compared to meta-heuristics using benchmark instances with charging stations. A case study is carried out using data from Chengdu, a major city in southwest China, to simulate the charging demand of public charging infrastructures. The proposed method provides more feasible allocations for public CSs and route planning, which could reduce the total delivery cost by 15%. This study demonstrates the potential of a bilevel optimizing approach to provide an optimized solution in citywide CS location selection and logistics routing problems.