The early evolution of planetesimals and planets can be constrained using variations in the abundance of neodymium-142 (142Nd), which arise from the initial distribution of 142Nd within the protoplanetary disk and the radioactive decay of the short-lived samarium-146 isotope (146Sm)1,2. The apparent offset in 142Nd abundance found previously between chondritic meteorites and Earth1,2has been interpreted either as a possible consequence of nucleosynthetic variations within the protoplanetary disk2,3,4or as a function of the differentiation of Earth very early in its history5. Here we report high-precision Sm and Nd stable and radiogenic isotopic compositions of four calcium-aluminium-rich refractory inclusions (CAIs) from three CV-type carbonaceous chondrites, and of three whole-rock samples of unequilibrated enstatite chondrites. The CAIs, which are the first solids formed by condensation from the nebular gas, provide the best constraints for the isotopic evolution of the early Solar System. Using the mineral isochron method for individual CAIs, we find that CAIs without isotopic anomalies in Nd compared to the terrestrial composition share a 146Sm/144Sm-142Nd/144Nd isotopic evolution with Earth. The average 142Nd/144Nd composition for pristine enstatite chondrites that we calculate coincides with that of the accessible silicate layers of Earth. This relationship between CAIs, enstatite chondrites and Earth can only be a result of Earth having inherited the same initial abundance of 142Nd and chondritic proportions of Sm and Nd. Consequently, 142Nd isotopic heterogeneities found in other CAIs and among chondrite groups may arise from extrasolar grains that were present in the disk and incorporated in different proportions into these planetary objects. Our finding supports a chondritic Sm/Nd ratio for the bulk silicate Earth and, as a consequence, chondritic abundances for other refractory elements. It also removes the need for a hidden reservoir or for collisional erosion scenarios5,6to explain the 142Nd/144Nd composition of Earth.