Having a mean density of 3,346.4 kg/m3, the Moon is a differentiated body, being composed of a geochemically distinct crust, mantle, and planetary core. This structure is believed to have resulted from the fractional crystallization of a magma ocean shortly after its formation about 4.5 billion years ago. The energy required to melt the outer portion of the Moon is commonly attributed to a giant impact event that is postulated to have formed the Earth-Moon system, and the subsequent reaccretion of material in Earth orbit. Crystallization of this magma ocean would have given rise to a mafic mantle and a plagioclase-rich crust.
Geochemical mapping from orbit implies that the crust of the Moon is largely anorthositic in composition, consistent with the magma ocean hypothesis. In terms of elements, the lunar crust is composed primarily of oxygen, silicon, magnesium, iron, calcium, and aluminium, but important minor and trace elements such as titanium, uranium, thorium, potassium, and hydrogen are present as well. Based on geophysical techniques, the crust is estimated to be on average about 50 km thick.
Partial melting within the mantle of the Moon gave rise to the eruption of mare basalts on the lunar surface. Analyses of these basalts indicate that the mantle is composed predominantly of the minerals olivine, orthopyroxene and clinopyroxene, and that the lunar mantle is more iron-rich than that of the Earth. Some lunar basalts contain high abundances of titanium (present in the mineral ilmenite), suggesting that the mantle is highly heterogeneous in composition. Moonquakes have been found to occur deep within the mantle of the Moon about 1,000 km below the surface. These occur with monthly periodicities and are related to tidal stresses caused by the eccentric orbit of the Moon about the Earth. A few shallow moonquakes with hypocenters located about 100 km below the surface have also been detected, but these occur more infrequently and appear to be unrelated to the lunar tides.
Several lines of evidence imply that the lunar core is small, with a radius of about 350 km or less. The size of the lunar core is only about 20% the size of the Moon itself, in contrast to about 50% as is the case for most other terrestrial bodies. The composition of the lunar core is not well constrained, but most believe that it is composed of metallic iron alloy with a small amount of sulfur and nickel. Analyses of the Moon's time-variable rotations indicate that the core is at least partly molten. Within the giant-impact formation scenario, the core formation of Moon could have occurred within the initial 100-1000 years from the commencement of its accretion from its moonlets. 
In 2010, a reanalysis of the old Apollo seismic data on the deep moonquakes using modern processing methods confirmed that the Moon has an iron rich core with a radius of 330 ± 20 km. The same reanalysis established that the solid inner core made of pure iron has a radius of 240 ± 10 km. The core is surrounded by the partially (10 to 30%) melted layer of the lower mantle with a radius of 480 ± 20 km (thickness ~150 km). These results imply that 40% of the core by volume has solidified. The density of the liquid outer core is about 5 g/cm3 and it could contain as much as 6% sulfur by weight. The temperature in the core is probably about 1600–1700 K (1330–1430 °C).
In 2019, a reanalysis of nearly 50 years of data collected from the Lunar Laser Ranging experiment with lunar gravity field data from the GRAIL mission, shows that for a relaxed lunar fluid core with non-hydrostatic lithospheres, the core flattening is determined as (2.2±0.6)×10−4 with the radii of its core-mantle boundary as 381±12 km.