Current estimates of the carbon flux between the surface and mantle are highly variable, and the total amount of carbon stored in closed hidden reservoirs is unknown. Understanding the forms in which carbon existed in the molten early Earth is a critical step towards quantifying the carbon budget of Earth's deep interior. Here we employ first-principles molecular dynamics to study the evolution of carbon species as a function of pressure in a pyrolite melt. We find that with increasing pressure, the abundance of CO2 and CO3 species decreases at the expense of CO4 and complex oxo-carbon polymers (CxOy) displaying multiple C-C bonds. We anticipate that polymerized oxo-carbon species were a significant reservoir for carbon in the terrestrial magma ocean. The presence of Fe-C clusters suggests that upon segregation, Fe-rich metal may partition a significant fraction of carbon from the silicate liquid, leading to carbon transport into the Earth's core.