Density of the Earth's core is lower than that of pure iron and the light element(s) in the core is a long-standing problem. Hydrogen is the most abundant element in the solar system and thus one of the important candidates. However, the dissolution process of hydrogen into iron remained unclear. Here we carry out high-pressure and high-temperature in situ neutron diffraction experiments and clarify that when the mixture of iron and hydrous minerals are heated, iron is hydrogenized soon after the hydrous mineral is dehydrated. This implies that early in the Earth's evolution, as the accumulated primordial material became hotter, the dissolution of hydrogen into iron occurred before any other materials melted. This suggests that hydrogen is likely the first light element dissolved into iron during the Earth's evolution and it may affect the behaviour of the other light elements in the later processes.