The evolution of the orbits of bodies ejected from the Earth has been studied at the stage of its accumulation and early evolution after impacts of large planetesimals. In the considered variants of calculations of the motion of bodies ejected from the Earth, most of the bodies left the Hill sphere of the Earth and moved in heliocentric orbits. Their dynamical lifetime reached several hundred million years. At higher ejection velocities v ej the probabilities of collisions of bodies with the Earth and Moon were generally lower. Over the entire considered time interval at the ejection velocity v ej , equal to 11.5, 12 and 14 km/s, the values of the probability of a collision of a body with the Earth were approximately 0.3, 0.2 and 0.15-0.2, respectively. At ejection velocities v ej ≤ 11.25 km/s, i.e., slightly exceeding a parabolic velocity, most of the ejected bodies fell back to the Earth. The probability of a collision of a body ejected from the Earth with the Moon moving in its present orbit was approximately 15-35 times less than that with the Earth at v ej ≥ 11.5 km/s. The probability of a collision of such bodies with the Moon was mainly about 0.004-0.008 at ejection velocities of at least 14 km/s and about 0.006-0.01 at v ej = 12 km/s. It was larger at lower ejection velocities and was in the range of 0.01-0.02 at v ej = 11.3 km/s. The Moon may contain material ejected from the Earth during the accumulation of the Earth and during the late heavy bombardment. At the same time, as obtained in our calculations, the bodies ejected from the Earth and falling on the Moon embryo would not be enough for the Moon to grow to its present mass from a small embryo moving along the present orbit of the Moon. This result argues in favor of the formation of a lunar embryo and its further growth to most of the present mass of the Moon near the Earth. It seems more likely to us that the initial embryo of the Moon with a mass of no more than 0.1 of the mass of the Moon was formed simultaneously with the embryo of the Earth from a common rarefied condensation. For more efficient growth of the Moon embryo, it is desirable that during some collisions of impactor bodies with the Earth, the ejected bodies do not simply fly out of the crater, but some of the matter goes into orbits around the Earth, as in the multi-impact model. The average velocity of collisions of ejected bodies with the Earth is greater at a greater ejection velocity. The values of these collision velocities were about 13, 14-15, 14-16, 14-20, 14-25 km/s with ejection velocities equal to 11.3, 11.5, 12, 14 and 16.4 km/s, respectively. The velocities of collisions of bodies with the Moon were also higher at high ejection velocities and were mainly in the range of 7-8, 10-12, 10-16 and 11-20 km/s at v ej , equal to 11.3, 12, 14 and 16.4 km/s, respectively.