The high logistics cost of fresh produce is the main problem that restricts the distribution of produce. How to reduce the logistics cost of fresh agricultural products, improve the utilization rate of logistics facilities, and improve distribution efficiency and service levels has become the key to research. As an important hub for fresh agricultural products, the fresh agricultural product distribution center can effectively integrate supply and demand information and is the key to ensuring the efficiency of fresh agricultural product distribution, especially to meet the urban fresh agricultural product distribution needs. The fresh agricultural product urban logistics distribution center has the characteristics of small service radius, small scale, many distribution batches and high distribution frequency. The service radius and the scale of the distribution center determine the function of the distribution service. In order to save costs while ensuring distribution efficiency and logistics service levels, it is necessary to scientifically and rationally plan the location of urban distribution centers for fresh agricultural products. Despite extensive research on the location of logistics distribution centers, there are still some shortcomings. First, by analyzing and summarizing the existing literature, the theory and research methods of urban logistics distribution centers for fresh agricultural products are summarized, the characteristics of urban logistics distribution centers for fresh agricultural products are analyzed, and the status of logistics centers for fresh agricultural products is summarized. Influencing factors and site selection process introduced the basic principles and steps of immune algorithm. Secondly, based on the location theory of distribution centers, a cost model for the location of urban logistics distribution centers for fresh agricultural products is established. The model takes into account economic and social factors, including distribution costs, fixed costs, operating costs, waste costs and carbon emission costs. In the case of traffic congestion, a carbon emission factor is introduced to calculate the environmental cost of the allocation process. Finally, combined with the calculation steps of the immune algorithm, the solution steps are designed for the location model of the urban fresh agricultural products logistics distribution center, and the actual calculation examples are studied using MATLAB software programming, and the distribution center is obtained based on the low model. Through the method of this article, the transportation speed of fresh agricultural products logistics distribution center location has been increased by 13%.