Knowledge of the abundance and distribution of light elements in the core is fundamental to the understanding of the Earth and other planetary systems. Recent studies (Li et al., 2018; Mashino et al., 2019) suggest the particular importance of carbon for explaining core properties, yet knowledge of carbon partitioning between the outer and inner core is unknown. By using the quasiharmonic approximation, ab initio molecular dynamics, and thermodynamic integration techniques, we have computed the chemical potential of carbon in liquid Fe and solid hcp‐Fe at core conditions. We find that substitutional carbon is more stable than interstitial carbon and other carbon defect cluster structures in solid Fe. Lattice strain and overcoordination effects lead to a high chemical potential of C in solid Fe compared to the liquid, and consequently carbon partitions almost completely into the liquid. We find that carbon can account for most of the density jump at the inner‐core boundary. This provides an alternative mechanism to the necessity of an oxygen‐rich outer core and may have significant implications for the composition and structure of the deep Earth.