We discuss the impact of dark matter self-heating on the gravitational clustering of dark matter. This thesis consists of two parts. The first part is devoted to discuss the impact of dark matter self-heating on the dark matter density profiles of galaxies. Dark matter self-heating is a heating mechanism of dark matter that is a collaboration of two kinds of dark matter interactions that are secluded from the Standard Model: elastic self-scattering and exothermic scattering of dark matter. Inside a galaxy, exothermic scatterings of dark matter produce energetic dark matter particles, which are captured before escaping a galaxy through elastic self-scatterings of dark matter. The excess kinetic energy of the captured particles modify the structure of galaxies, which may be observed through astronomical observations, e.g., by measuring the galactic rotation curves. By employing the semi-analytic gravothermal fluid method, we sharpen the prediction of dark matter self-heating on structures of galaxies, and discuss how dark matter self-heating may be constrained through astronomical observations. In the second part of this thesis, we discuss the impact of dark matter self-heating on the thermal history of dark matter. The same dark matter self-heating that takes place inside galaxies could also heat dark matter in the early Universe. The dark matter self-heating could potentially affect the relic abundance of dark matter, and the evolution of the dark matter density perturbations in the early Universe. By taking semi-annihilation of dark matter as an example, we clarify the determination of dark matter relic abundance and the thermal history of dark matter in the presence of the self-heating. Accommodation of longer period of the self-heating in the early Universe may result in hotter dark matter particles. The resultant warmness can be constrained by the Lyman-$\alpha$ forest observations, which provides a lower bound on dark matter mass in the scenario of dark matter self-heating.