Underground Hydrogen (H2) storage (UHS) plays a critical role in the low-carbon hydrogen economy, which aims to mitigate global warming by replacing carbon-emitting fossil fuels. Depleted natural gas reservoirs, along with saline aquifers and engineered salt caverns, are primary options for UHS. Depleted natural gas reservoirs often contain numerous abandoned wells, and the potential leakage of H2 through these wells is a significant concern for UHS. However, research on H2 leakage through abandoned wells remains limited. In this study, a geological model comprising a natural gas reservoir, two saline aquifers, and a leaking well was developed. Systematic numerical simulations were performed to evaluate the potential H2 leakage through the abandoned well under varying geological conditions. The integrity of the abandoned well, as the primary factor of interest, was modeled as a channel with high equivalent permeability. The influencing factors include permeability of the abandoned well, thickness of the confining zone, distance between the abandoned well and the injection/production well, permeability of the reservoir, and shut-in time of the natural gas reservoir. The influence of these key factors on H2 leakage was quantified. The results indicated that the failure of the abandoned well was the primary factor contributing to significant H2 leakage. H2 leakage resulting from severe failure of the abandoned well can be three orders of magnitude greater than that in the base case with a mild failure of the abandoned well. An increase in the thickness of the confining zone or a greater distance between the injection/production well and the abandoned well leads to a linear reduction in H2 leakage. Reservoir permeability and the shut-in time of natural gas reservoirs have a nonlinear impact on H2 leakage and converged to a limit. Scaling relations between H2 leakage and the influencing factors were fitted to quantify their effects. These findings contribute to improved site selection and safety assessments for UHS projects.