The evacuation routes on a conventional evacuation diagram are fixed as they do not consider the real-time impact of fire products on the routes in the event of a fire, thus probably resulting in an ineffective evacuation. To resolve this problem, this study proposes an improved ant colony optimization (IACO) algorithm to determine the optimal evacuation route in a supermarket building with unfavourable fire conditions under the combined effects of temperature and fire products. First, a simulation software (PyroSim) is used to simulate the real fire scenario with the real-time temperature, CO concentration, and smoke concentration at each location, obtained from monitors. The heuristic function and pheromone update strategy of the basic ACO are improved based on the monitoring data. Next, the optimal path planning is achieved by using the IACO while considering fire products. Compared with the paths planned by the basic ACO and a commercial software (Pathfinder), the path planned by the IACO can effectively avoid areas with harsh fire environments and reducing casualties due to failed evacuation routes caused by changes in the fire environment. Finally, based on the IACO, a visualized evacuation guidance system is developed to demonstrate the optimal routes for users.