Logistics and distribution is a vital link to guarantee the stable supply of the e-commerce market and the healthy development of the industry. With the constant growth of the e-commerce, the efficiency and service quality of logistics and distribution have been paid more and more attention to. Therefore, the study firstly Considering distribution fixed cost, transportation penalty cost and carbon emission cost, the vehicle routing optimization model is transformed into the lowest transportation cost model, then uses an improved traditional artificial fish swarm algorithm to find the optimum way for this model, and finally verifies its performance and applicability through experiments. The performance test results show that the algorithm finds the optimal solution 3589 and 3590 in 63 and 78 iterations in the Oxford Robot Car dataset and Apollo Scape dataset, respectively; the average running time of the algorithm is 11.864s and 11.967s in the 10 operation time tests; in the operation function test, the algorithm. The algorithm was able to overcome the local optimal solution problem. The applicability simulation shows that this algorithm stabilizes after 53 iterations, the minimum cost of the optimal solution of the model is $41,224, and the total distance of distribution is 9035 km. The research algorithm is fast in finding the optimal value, which is close to it, indicating that the algorithm is highly efficient and reliable, and can greatly optimize the path of e-commerce logistics delivery vehicles, and give a theoretical foundation for the optimization of logistics delivery paths in other industries.