Pipelines, especially existing natural gas pipelines, provide an efficient and economical means for hydrogen transport, accelerating realization of a full-scale hydrogen economy. However, the existing aged pipelines usually contain dents, which serve as effective traps to accumulate hydrogen atoms, potentially causing hydrogen embrittlement and pipeline failures. To date, there has been a strong interest in development techniques for assessment of hydrogen atom distribution at a dent on pipelines. In this work, a three-dimensional nonlinear finite element-based model was developed to investigate the hydrogen atom diffusion and distribution at a constrained dent on an X52 steel pipe. Parametric effects, including dent depth and internal pressure, were determined. The presence of a dent on pipelines drastically changes the local stress and strain distributions, facilitating diffusion and accumulation of hydrogen atoms at the dent. The minimum hydrogen atom concentration at the crystalline lattice sites, (i.e., 3.8 mol/m3) is located on the outer surface of the dent center, and the maximum hydrogen atom concentration (i.e., 12.1 mol/m3) is found on both sides of the dent with 103 mm from the dent center in the circumferential direction. The hydrogen atom concentration at trap sites at the dent is much lower than that at the lattice sites. The diffusion and accumulation of hydrogen atoms at the dent area is affected by two competitive mechanisms, i.e., hydrostatic stress and plastic strain, depending on the initial concentration of hydrogen atoms entering the interior of the pipe steel. At a low initial concentration such as 0.001 mol/m3, the equivalent plastic strain dominates the distribution of hydrogen atoms at the dent, and the hydrogen atom concentration at the lattice sites is much lower than the concentration at the trap sites. At high initial hydrogen atom concentrations such as 0.1 and 1 mol/m3, the hydrostatic stress is the dominant factor to determine the distribution of hydrogen atoms, which mainly accumulate at the lattice sites. With an increased depth of the dent, both the von Mises stress and plastic strain concentrations increase, and so is the hydrogen atom concentration. The increase of internal pressure from 5 MPa to 15 MPa only slightly elevates the von Mises stress, equivalent plastic strain and the hydrogen atom concentration.