Temperature is the primary factor affecting the law of coal gas desorption. When the core method is used to measure the coal seam gas content (CSGC), the temperature of the coal core sample (CCS) will increase because the heat generated by the core bit cutting and rubbing the coal is transferred to the CCS through the core tube. To solve the above problems, the temperature of the core tube wall during coring at core depths of 10, 20, and 30 m was measured by a self-designed temperature measuring device. The thermodynamic models of the core bit and the core tube during coring were established. The thermal flux of the system at different stages was inverted numerically by the dichotomy method. The reliability of the model was verified by comparing the numerical simulation results with the field measurement results. The main influencing factors during coring were studied by numerical simulations. The results show that the temperature change of the core tube wall goes through four stages: slowly rising, fast rising, slowly rising, and slowly falling, which correspond to the process of pushing the core tube, drilling the CCS, and the early stage and later stage of withdrawing the core tube, respectively. The maximum temperature of the core tube wall appears in the first 5 min of withdrawing the core tube and increases with the increase of core depth. When the core depth is 30 m, the maximum temperature of the core tube wall reaches 105.17 °C. The temperature of the measuring point at the end of drilling the CCS and the maximum temperature during coring linearly increase with the core depth, friction heat generated while pushing the core tube, and coal strength. This study can provide a basis for further research on the dynamic distribution characteristics of temperature in the CCS during coring, which is of profound significance to calculate the gas loss amount and CSGC.