Hydrogen embrittlement is a phenomenon that affects the performance of steel used for oil and gas pipelines. This paper presents a study of the effect of hydrogenation on the residual stresses of an API 5L X65 steel pipe. Residual stresses were analyzed by X-ray diffraction technique using the sin2Ψ method. The hydrogenation of base metal and welded joint specimens was performed by electrochemical tests in a simulated soil solution NS4. Results show that the hydrogenation led to significant changes in residual stress configuration and in the mechanical properties of steel. The hydrogenation increased the magnitude of the longitudinal residual stress of base metal and fusion zone, without changing the tensile/compressive nature. On the other hand, the hydrogenation increased the intensity of the tangential stress of base metal, and changed from compressive to tensile the residual stress of the fusion zone. The microstructural characterization by optical and scanning electron microscopy was used to complement this study.