Under the influence of COVID-19, the efficiency of e-commerce distribution in public health emergencies has become the key to ensuring people’s normal lives. With the development of e-commerce, the location of distribution center is becoming more and more important, which is related to the healthy and long-term development of e-commerce. However, the traditional location efficiency is low, which cannot play an immediate role in the development of e-commerce. This paper combines weiszfeld algorithm, improves particle swarm optimization algorithm, improves the operation efficiency and location accuracy, and finally gets a relatively satisfactory result. Results data analysis shows that the improvement and integration of the algorithm is reasonable and effective. This method has important reference value for e-commerce location.