Carbon (C) is regarded as a possible light element in the Earth’s outer core; however, its abundance in this region remains a subject of controversy. Here, we applied first-principles molecular dynamics (FP-MD) simulations to calculate the density (ρ), thermodynamic properties, and sound velocity (VP) of liquid iron-carbon (Fe-C) alloys (Fe-X wt% C, X = 0, 2.1, 4.7, 7.6, and 11.2) under the outer core conditions (~136-330 GPa, 4000-6000 K) to explore the composition of the outer core. Compared with seismic observations, roughly 5.1-6.6 wt% C alloyed with Fe can explain the outer core’s ρ deficit, while 2.9-3.7 wt% C aligns with the seismological VP. Given this discrepancy, we extended our investigation to the iron-carbon-oxygen (Fe-C-O) ternary alloy to provide a more in-depth understanding of the Earth’s outer core composition. The results reveal that certain Fe-C-O models (i.e. Fe-7.3 wt% O, Fe-6.5 wt% O-0.3 wt% C, and Fe-5.3 wt% O-1.1 wt% C) can satisfy seismic observations under some possible geothermal profile of the outer core. The ‘optimal’ models which can match the seismic data consistently exhibit O-rich characteristics consistently, with the maximum C content is 1.5 wt% and the minimum O content is 4.7 wt%. In conclusion, the findings in this work offer some possible C and O reserves in the Earth’s outer core, which benefits to the composition prediction of the outer core.