Monitoring the temperature to determine the fire source locations is essential for controlling the spontaneous combustion in the goaf. Optical fiber sensors are employed to measure the temperature distribution in the goaf. However, due to changes in the geological conditions and the influence of the falling rocks in the goaf, only sensors on the upper side of the uncompacted goaf, due to inclination and coal pillar, may remain. Unilateral sensors are located on the upper side of the goaf, while fire occurs in the center. To investigate the issue with linear unilateral sensors, a two-dimensional inverse method has been developed to determine the location of fire sources by considering heat transfer after a fire inside the goaf. The equations were theoretically solved using Green's function method to obtain the internal temperature distribution of the physical model of the goaf. Sensitivity analysis identified the most crucial parameters in the process of spontaneous heating at different temperature. The fire source location can be determined using a loop method based on the model calculations. We considered a case to validate the model. Accurately identifying the fire source location in the goaf using the unilateral sensors has an essential theoretical and practical significance for fire prevention and fighting.