Although cementite is the most common carbide found in steel components, its interaction with hydrogen (H) is still under discussion. Most studies investigate the effect of cementite by comparing the as-quenched vs. tempered structure of the same material. However, tempering reduces the dislocation density which plays an important role in several hydrogen embrittlement (HE) mechanisms. Therefore, this study investigates the HE behavior by in-situ hydrogen bending tests of two tempered medium-carbon martensitic steels with a similar dislocation density but a different cementite concentration. Moreover, a comparison between the as-quenched and the tempered samples is also made. This experimental strategy allows to generate important insights on the role of cementite on the susceptibility to HE while the influence of the dislocation density is limited. Thermal desorption spectroscopy and melt extraction results show that cementite acts as an effective H trap and reduces the H diffusion coefficient. When mechanically tested in a H rich environment, the presence of cementite increases the resistance to HE by hindering the H diffusion towards the most critical sites in the microstructure. However, when the samples are fully saturated with H prior to testing, cementite loses its capability to influence the fracture behavior.