Fire incidents in underground environments, such as subway stations and shopping malls, pose significant hazards due to restricted ventilation and confined spaces. These conditions complicate rescue operations, particularly given the unpredictable nature of fires. Effective integration of fire risk assessment into rescue path planning is essential for ensuring both safety and operational efficiency. However, fire risk is inherently complex, varying across both temporal and spatial dimensions, and accurate assessment depends on precise fire situation inference. Despite advancements in fire simulation technologies, inconsistencies in geometric structures between computational units limit seamless integration with path planning models. Consequently, many existing studies rely on simplistic and less reliable linear fire inference models, compromising the safety of rescue operations. This paper addresses these challenges by proposing an underground rescue path planning method based on a comprehensive fire risk assessment, aimed at enhancing both safety and operational efficiency. A fire risk assessment approach, driven by fire situation inference, is introduced, employing a novel grid-matching transformation to capture the spatio-temporal dynamics of fire conditions using high-precision simulation software. Additionally, an improved A* algorithm is developed for real-time rescue path optimization, minimizing path risk based on the results of the risk assessment. The proposed method is validated through a detailed case study, demonstrating its effectiveness and reliability.