With the growing demand for geological storage of CO2, depleted gas reservoirs are becoming attractive targets due to proven caprock and existing infrastructures. However, Joule-Thomson cooling can pose a flow assurance risk leading to the formation of hydrates and possible injectivity loss. This study investigates the impacts of capillary pressure and permeability heterogeneity on the formation of hydrates during CO2 storage in depleted gas reservoirs. A compositional thermal reservoir simulator is used to model the fluid and heat flow of CO2 in methane and water-saturated reservoirs. The dissociation and formation of methane and CO2 hydrates are modeled using kinetic reactions to calculate porosity and permeability reduction during hydrate formation. The capillary pressure is scaled using the Leverett J-function to account for variations in porosity and permeability values. The water residual saturation is also correlated with permeability. Variograms are used to generate areal heterogeneity for multilayered reservoir models. Sensitivities to injection rate and wellhead temperature are also performed. The results indicated that the Joule-Thomson cooling is increased with lateral heterogeneity, leading to more formation of hydrates. The heterogeneity created low permeability zones near the injection well, leading to higher pressure drawdown which intensifies the cooling effect. The reduced water saturation during the injection of CO2 altered the capillary pressure and resulted in water backflow and crossflow. The magnitude of capillary-driven backflow and crossflow was observed to be a function of the capillary pressure gradient. For cases with hydrate formation, a complete conversion of water in the pores to hydrate and ice resulted in porosity reduction proportional to its water content and injectivity reduction as high as 30% for multilayered cases. However, water backflow provided a continuous source of water for hydrate and ice formation in low permeability layers which lead to near well plugging. The water backflow due to the capillary pressure gradient can intensify the risk of hydrate formation by more water content in the near wellbore.