Gun barrels are subjected to time-varying high-intensity heat flux under multiple firing, which may damage the material and limit the overall performance of the gun. In order to monitor the thermal state of a gun barrel, an inverse method coupling the finite difference method with the sequential function specification method was developed to estimate the unknown time-varying heat flux imposed on the inner wall of a gun barrel. A two-layer hollow cylindrical tube was assumed with the convection heat transfer boundary condition on the outer wall of the tube. A direct heat transfer model was developed, and was used to estimate the temporal distribution of boundary heat flux in approximately real time based on the measured transient temperature at some positions on the outer wall of the gun barrel. Numerical tests were performed to verify the effectiveness and reliability of this method by investigating the influence of temperature measurement noises and future time step selection. The results show that the proposed method has high precision and efficiency in extracting the time-varying heat flux under one-shot and three-shot firing conditions. When there is a measurement noise, this method has good anti-illness characteristics and can achieve better results by appropriately selecting the value of a future time step.