As one of the most important means of nature gas peak shaving and energy strategic reserving, the reliability assessment of underground gas storage (UGS) system is necessary. Although many methods have been proposed for system reliability assessment, the functional heterogeneity of components and the influence of hydrothermal parameters on system reliability are neglected. To overcome these problems, we propose and apply a framework to assess UGS system reliability. Combining two-layer Monte Carlo simulation (MCS) technique with hydrothermal calculation, the framework integrates dynamic functional reliability of components into system reliability evaluation. To reflect the state transition process of repairable components and their impact on system reliability, the Markov model is introduced at system level. In order to improve the calculation speed, artificial neural network (ANN) model based on off-line MCS is established to replace the on-line MCS at components level. The proposed framework is applied to the reliability assessment and operation optimization of an UGS under different operation conditions. Compared with the traditional single-layer MCS method, the proposed method can not only reflect the variation of UGS reliability with hydrothermal parameters and operation time, but also can improve evaluation efficiency significantly.