Clay-rich rocks such as mudstone have a great affinity for water due to the formation of a diffuse double layer around the negatively charged minerals. This makes the behavior of this rock type unique when exposed to different temperatures. Therefore, the tensile, compressive, and shear mechanical behaviors of mudstone were investigated under the coupling effect of temperature and confining pressure. Results indicated that the mudstone can sustain a temperature of up to 500 °C without the appearance of thermal cracks. By increasing the temperature from room temperature (RT) to 500 °C, the mechanical properties improved due to thermal expansion that causes the closure of pre-existing micro-cracks. Tensile strength increased by about 92.3% after thermal treatment at 500 °C, while the tensile modulus of elasticity (ET) increased from 14.2 GPa under RT to 16.1 and 20.5 GPa after thermal treatment at 250 and 500 °C, respectively. The compressive behavior of the mudstone was greatly influenced by the coupling of temperature and confining pressure. Comparing between initial (T = RT and σ3 = 0.0 MPa) and extreme (T = 500 °C and σ3 = 10 MPa) conditions in this study, compressive strength, axial and transverse moduli of elasticity increased by about 150%, 59%, and 148%, respectively. However, Poisson's ratio decreased from 0.387 to 0.248, indicating an increase in the brittle behavior of the mudstone between initial and extreme conditions. Regarding shear behavior, the linear Mohr–Coulomb criterion was in good agreement with test data to represent the shear behavior of the mudstone before and after thermal treatment. A little reduction of about 4% in the peak friction angle was observed after thermal treatment at 500 °C, while the cohesion increased by about 47%. This indicates a significant improvement in the peak shear strength of the mudstone with increasing temperature. The experimental findings of this study offer valuable insights into the mudstone behavior when exposed to thermal effect. The obtained parameters play a critical role in the governing equations that describe how the rock material responds to thermal effect in terms of compressive, tensile, and shear behavior.