The transient internal flow in high-pressure high-production gas wells generates severe water hammer and tubing string vibration, which accelerates fatigue damage, joint wear, thread loosening, and other wellbore integrity problems. Based on the analysis of transient flow in gas wells, a mathematical model for fluid pressure surge and the induced tubing string vibration is developed and validated by similarity experiments. This method considers fluid-structure interaction, initial loads of tubing string, and compressibility of natural gas, and can fill the gap in quantification of water hammer pressure and tubing sting dynamic load in high-pressure high-production gas wells. On this basis, the effects of valve closure time, production rate, liquid content, and tubing string structure on transient flow and tubing string characteristics are analyzed systematically. The calculations show that wellhead pressure increases rapidly, and pressure wave propagates along tubing string to induce vibrations in the string after an instantaneous shut-in at the wellhead. During this transient process, fluid pressure and axial stress at wellhead reach their maximum valves. Owing to the fixed constraint effect of wellhead and downhole packer, the lack of restrictions on tubing distant from wellhead and packer enhances the severity of axial vibration. As valve closure time increases, the maximum wellhead pressure, tubing vibration displacement, and velocity gradually decrease. Therefore, the most direct way to control water hammer effect and tubing string vibration is to extend the shut-in time or prevent a rapid shut-in of gas well. The methods used in this study and the results obtained therein can serve as both a theoretical framework and practical foundation for the prediction and control of water hammer effect and tubing string vibration in high-pressure high-production gas wells.