The temperature profile plays an important role in well integrity, flow assurance, and well test. Meanwhile, the impact of engineering conditions should not be ignored while calculating the well temperature profile. Therefore, in this study, we established a model to analyze the changing law of the temperature profile inside the production string of a high-pressure/high-temperature gas well (HPHT gas well). The proposed model considers the flow friction caused by a high production rate. Meanwhile, the variations in gas properties are taken into account to increase the model accuracy, including gas density, flow velocity, and viscosity. The analysis indicates that the temperature in the production string decreases more and more quickly from the reservoir to the wellhead. The wellhead temperature changes more and more slowly with time. When the reservoir temperature is too low to maintain production, it is useful to regulate the production rate or inject the thermal insulating fluid into the annulus to avoid the block caused by wax deposition or hydrate deposition. Considering the sensitivity, feasibility, and cost, it is recommended to change the well temperature profile by adjusting the production rate. If not applicable, the thermal conductivity can also be optimized to change the temperature profile.