Study on fresh food safety reliability and temperature control has being a research focus in the fresh food cold distribution optimization study field. On this basis, optimization of transportation routing problem with time windows for fresh food in time-varying road network is studied by considering both economic cost and fresh food safety loss. A calculation method for path division strategy is designed. A food safety value loss measurement function, a metric function of energy and heat conversion a measure function of carbon emission rate are employed by considering time-varying vehicle speeds, fuel consumptions, cost of temperature control, the loss of food safety reliability and carbon emissions from transportation and temperature control. The fresh food cold chain distribution vehicle routing problem model with time windows in time-varying road network is formulated based on the objective of the distribution cost and food safety value loss minimization. According to the characteristics of the model, an adaptive improved ant colony algorithm is designed. Finally, the experimental data show that the model can effectively avoid the congestion period, reasonably control the refrigeration temperature, reduce the distribution cost, and improve food safety.