  In this paper, we investigate the process in which axion dark matter
undergoes thermal friction, resulting in energy injection into dark radiation,
with the aim of mitigating the Hubble tension and large-scale structure
tension. In the early universe, this scenario led to a rapid increase in the
energy density of dark radiation; in the late universe, the evolution of axion
dark matter is similar to that of cold dark matter, with this scenario
resembling decaying dark matter and serving to ease the large-scale structure
tension. We employ cosmological observational data, including cosmic microwave
background (CMB), baryon acoustic oscillation (BAO), supernova data (SNIa),
$H_0$ measurement from SH0ES, and $S_8$ from the Dark Energy Survey Year-3
(DES), to study and analyze this model. Our results indicate that the thermal
friction model offers partial alleviation of the large-scale structure tension,
while its contribution on alleviating Hubble tension can be ignored. The new
model yields the value of $S_8$ is $0.795\pm 0.011$ at a 68% confidence level,
while the $\Lambda$CDM model yields a result of $0.8023\pm 0.0085$. In
addition, the new model exhibits a lower $\chi^2_\mathrm{tot}$ value, with a
difference of -2.60 compared to the $\Lambda$CDM model. Additionally, we
incorporate Lyman-$\alpha$ data to re-constrain the new model and find a slight
improvement in the results, with the values of $H_0$ and $S_8$ being
$68.76^{+0.39}_{-0.35}$ km/s/Mpc and $0.791\pm 0.011$ at a 68% confidence
level, respectively.
