Oil and gas leakage may account for serious potential accidents, such as a blowout, fire, and explosion, during offshore drilling and completion operations. Safety barrier system plays a significant role in preventing unintentional flow leaking from formation to outside during different offshore operations due to many challenges and uncertainties. The failure modes identification, fault diagnosis in real time and failure probability estimation of safety barriers contribute to improve their performance and enhance the operational safety. A new approach is presented for capturing dynamics and determining complex relationships of barrier components based on leakage paths. This approach takes into account the influence of degradation of barriers by introducing the time-variant modeling algorithm. Fault tree and dynamic Bayesian network theory are integrated to conduct the dynamic and quantitative risk of downhole leakage incidents. A case study with focusing on the shut-in operation scenario is adapted to illustrate the feasibility of the proposed approach.