Repurposing existing natural gas pipelines for hydrogen transport has attracted wide interests. However, the corrosion defect present on these aged pipelines can affect hydrogen (H) atom accumulation, potentially causing hydrogen embrittlement. In this work, a finite element-based model was developed by coupling solid mechanics and H atom diffusion to investigate the distribution of H atoms at a corrosion defect on a steel pipe segment under applied longitudinal tensile strains. The applied strain causes local stress (both Mises stress and hydrostatic stress) and strain concentrations at the corrosion defect, affecting the H atom diffusion and distribution. In the absence of the tensile strain, the H atoms, once entering the interior of pipe, diffuse uniformly into the pipe body along the radial direction driven by a concentration gradient. When a strain is applied on the pipe, the H atom diffusion is driven by hydrostatic stress. The maximum H atom concentration exceeds the initial concentration of H atoms entering the steel pipe, indicating the H atom accumulation at the corrosion defect. The applied tensile strain also affects the location where the H atoms accumulate. For both internal and external corrosion defects, more H atoms will be concentrated at the defect center when the defect length reduces and the depth increases.