The observation that mid-ocean ridge basalts had ~3× higher iodine/plutonium ratios (inferred from xenon isotopes) compared to ocean island basalts holds critical insights into Earth’s accretion. Understanding whether this difference stems from core formation alone or heterogeneous accretion is, however, hindered by the unknown geochemical behavior of plutonium during core formation. Here, we use first-principles molecular dynamics to quantify the metal-silicate partition coefficients of iodine and plutonium during core formation and find that both iodine and plutonium partly partition into metal liquid. Using multistage core formation modeling, we show that core formation alone is unlikely to explain the iodine/plutonium difference between mantle reservoirs. Instead, our results reveal a heterogeneous accretion history, whereby predominant accretion of volatile-poor differentiated planetesimals was followed by a secondary phase of accretion of volatile-rich undifferentiated meteorites. This implies that Earth inherited part of its volatiles, including its water, from late accretion of chondrites, with a notable carbonaceous chondrite contribution.