In the giant impact theory, the Moon formed from debris ejected into an Earth-orbiting disk by the collision of a large planet with the early Earth. Prior impact simulations predict that much of the disk material originates from the colliding planet. However, Earth and the Moon have essentially identical oxygen isotope compositions. This has been a challenge for the impact theory, because the impactor’s composition would have likely differed from that of Earth. We simulated impacts involving larger impactors than previously considered. We show that these can produce a disk with the same composition as the planet’s mantle, consistent with Earth-Moon compositional similarities. Such impacts require subsequent removal of angular momentum from the Earth-Moon system through a resonance with the Sun as recently proposed.