The mechanical properties of C-doped hexagonal close-packed (hcp) iron are studied at high pressure from first-principles calculations. The energy required for doping with C as an interstitial impurity is 246 meV/1 wt % C at 120 GPa for one unit cell of hcp Fe and increases almost linearly with pressure. The density deficit of the inner core can be matched for 1 to 2.5 wt % in hcp Fe, depending on the thermal profile. Carbon doping in hcp iron increases the compressional seismic wave velocity, decreases the shear wave velocity, while increasing the shear wave splitting and seismic anisotropy. In general, the presence of C in the inner core helps in explaining the observed seismic properties, though it cannot be considered the only light element.