Based on the joint inversion of seismic and gravity data in combination with phase equilibrium calculations within the Na2O–TiO2–CaO–FeO–MgO–Al2O3–SiO2 system using the method of Gibbs free energy minimization, we estimated the influence of the thermal state on the model chemical composition of the lunar mantle and the size of the Fe–S lunar core. Models based on the Apollo seismic data and mass and moment of inertia estimates from the data of the GRAIL mission were used as boundary conditions. The solution of the inverse problem provided constraints on the chemical composition (major oxide abundances) and mineralogy of the three-layer mantle. It was shown that, independent of temperature distribution, the FeO contents (~11–14 wt %) and MG# values (80–83) of the upper, middle, and lower mantle of the Moon are approximately equal and strongly different from those of the bulk silicate Earth (BSE): FeO ~ 8% and MG# ~ 89. In contrast, the estimates of Al2O3 content in the mantle are sensitive to temperature distribution. The analysis of thermal state models with temperature differences of 100–200°C at different depths showed that the Al2O3 content increases from 1–5 wt % in the upper and middle mantle to 4–7 wt % in the lower mantle containing up to 20 wt % garnet. The lunar abundance of Al2O3 is ~(1.0–1.2) × BSE for “cold” models and may be as high as (1.3–1.7) × BSE for “hot” models. The abundance of SiO2 is less sensitive to temperature distribution and is 50–55 wt % in the upper mantle and 45–50 wt % in the lower mantle. Orthopyroxene rather than olivine is the dominant mineral of the upper mantle. Based on the modeling of Fe–S melt density at high P and T, the size of the lunar core was estimated. The radius of the Fe–S core having a mean density of 7.1 g/cm3 and a sulfur content of 3.5–6.0 wt % lies within the range 50–350 km with the most probable value of approximately 300 km and depends weakly on the thermal regime of the Moon. The results of modeling imply that the lunar mantle is chemically stratified and the compositions of the Earth and its satellite are significantly different.