Offshore heavy oil resources are abundant, but they have greater difficulty and higher costs compared to onshore extraction. When crude oil flows through the seawater section, the temperature of the crude oil decreases faster, making it susceptible to solidification in the wellbore and resulting in lower well production. The cooling of crude oil becomes more pronounced in deep-water wellbore. However, the injection of low-temperature gas will have a cooling effect on the formation production fluid, which will have a negative effect. The model analyzes the effects of coiled tubing running depth, gas injection temperature, gas injection volume, coiled tubing diameter, and crude oil production on the temperature distribution of heavy oil in deep-water and shallow water wellbores. We propose recommendations for the selection of each parameter for deep and shallow water environments by analyzing and summarizing the laws.