Cosmological evolution of the axion field in the early universe might be significantly affected by thermal friction induced by the axion coupling to the thermalized hidden sector. We examine the effects of such a thermal friction on axion dark matter density and its perturbation when the thermal friction dominates over the Hubble friction. We show that in the presence of sizable thermal friction there can be an exponential decay phase of the axion field before the oscillation phase, during which the axion energy density is efficiently dissipated into a hidden thermal bath. Consequently, the previously excluded parameter region due to overclosing relic axion density becomes cosmologically viable with thermal friction. In particular, a QCD axion much lighter than μeV is viable without tuning the initial misalignment angle. We also find that thermal friction can affect the density perturbation of axion dark matter in various ways. For instance, it can alleviate the large-scale isocurvature bound on axion dark matter in the pre-inflationary PQ breaking scenario, which would make the pre-inflationary axion dark matter compatible with high scale inflation over a wide range of model parameters. In the post-inflationary PQ breaking scenario, thermal friction can also significantly change the scaling behavior of axionic strings, and therefore the typical size of the resultant axion miniclusters.