The evolution and internal structure of Mars are, by comparison to its present-day surface, poorly known—although evidence of recent volcanic activity1 suggests that its deep interior remains hot and convectively cooling. The cooling rate of Mars is related to its early thermal state and to its rheology, which determines its ability to deform and to dynamically evolve2. Attempts to reconstruct the dynamic history of Mars and reveal its present-day structure, by combining the study of thermal evolution with surface observations, are limited by the interplay between several key quantities—including temperature, composition and rheology. Here we show that by considering Phobos (the closest satellite of Mars)—the orbital evolution of which is governed by the thermochemical history of Mars, through tidal interactions—we can gain insight into the thermal history and rheology of the planet. We investigated the long-term evolution of the main envelopes of Mars; these comprise a liquid metallic core that is overlain by a homogeneous silicate convecting mantle underneath an evolving heterogeneous lithospheric lid that includes a crust enriched in radiogenic elements. By exploiting the relationship between Mars and Phobos within an established in situ scenario for the early origin of the moons of Mars3, we find that—initially—Mars was moderately hotter (100 to 200 kelvin) than it is today, and that its mantle sluggishly deforms in the dislocation creep regime. This corresponds to a reference viscosity of 1022.2 ± 0.5 pascal seconds and to a moderate to relatively weak intrinsic sensitivity of viscosity to temperature and pressure. Our approach predicts a present-day average crustal thickness of 40 ± 25 kilometres and a surface heat flow of 20 ± 1 milliwatts per square metre. We show that combining these predictions with data from future and ongoing space missions—such as InSight—could reduce uncertainties in Martian thermal and rheological histories, and help to uncover the origin of Phobos.