In order to maximize the overall profit of the supply chain of fresh food e-commerce platform, the supply chain coordination and optimization model of fresh food e-commerce platform based on the improved bacterial foraging algorithm is constructed. The basic model of bacterial foraging algorithm is constructed through chemotaxis, reproduction, elimination & dispersal, and the bacterial foraging algorithm is improved by using four parts: bacterial individual and parameter initialization, chemotaxis behavior, reproduction behavior and migration behavior, so as to realize the coordination and optimization of the supply chain of fresh food e-commerce platform. Use the Internet service platform to promote the electronization of the supply chain transaction process and improve the overall operation efficiency. Through the cooperation among fresh food suppliers, fresh food e-commerce and upstream fresh food suppliers, the supply chain coordination and optimization model of fresh food e-commerce platform is constructed to improve the overall profit of the supply chain. The experimental results show that using the improved bacterial foraging algorithm to solve the supply chain coordination and optimization model of fresh food e-commerce platform has high effectiveness, and can maximize the overall profit of the supply chain of fresh food e-commerce platform.