Thermal energy storage is a key component in harnessing renewable resources, compensating for the energy variations across time scales. A popular strategy for thermal energy storage is storing thermal energy in hot water tanks, which are generally made of copper, stainless steel, and vitreous enamel-lined carbon steel. However, these materials usually suffer a high production cost and short life cycle. UHPC with superior strength and durability holds the potential as a construction material for hot water tanks, which are commercially available and affordable for large-scale applications. During the charging process of hot water tanks, the UHPC structures are thus loaded by a long-term temperature-pressure load (autoclaving condition). However, the influence of long-term autoclaving on UHPC is still unclear. Therefore, the influence of long-term autoclaving at 200°C on the mechanical properties and microstructure of UHPC is studied here. The effect of the long-term autoclaving depends on the UHPC compositions. The compressive strength can stay robust owing to the accelerated formation of hydrates, while the flexural strength is vulnerable to the long-term autoclaving. Katoite, hydroxylellestadite, and scawtite are identified as the new hydrates in the autoclaved UHPC with typical components. The transformation of amorphous C-S-H into more ordered phases results in the low flexural strength and the undensified interface between the matrix and steel fibres. The partial replacement of cement by fly ash mitigates the detrimental effect of the long-term autoclaving. The incorporation of fly ash provides additional silica and increases the ratio of silica to cement, leading to more poorly crystallized C-S-H with a low Ca/Si ratio, which benefits microstructure densification and mechanical strength. The decrease of Ca/Si ratio and the increase of Al by fly ash accelerate the decomposition of katoite and hydroxylellestadite and formation of tobermorite. This study clarifies the influence of the long-term autoclaving on UHPC and provides guidance for developing an applicable and sustainable UHPC as the construction material for hot water tanks.