Sand production encountered in the 2013 offshore field gas production tests at the Nankai Trough, Japan, could be attributed to well failure during reservoir compaction. In this study, well integrity under various reservoir compaction patterns for the Nankai Trough case is examined using a well-formation finite element model. The modelling details include the inclusion of a cement sheath as well as the modelling of construction processes (such as cement shrinkage). Well elongation in the overburden layer becomes significant when the reservoir subsidence is localized near the wellbore under large depressurization. Results show that the maximum plastic deviatoric strain level in the cement could reach 0.7% when the maximum reservoir subsidence reaches 0.85 m and cement shrinkage is limited. When cement shrinkage rises to 0.75%, the maximum plastic deviatoric strain increases to 2.4% as the cement accumulates additional plastic strain during shrinkage due to its deformation being constrained by the casing. In order to prevent the cement from failure, it might be effective to hold the pressure drawdown at a low level (e.g., several MPa) until the hydrate dissociation front advances to a certain radius from the well (e.g., a couple of tens of metres).