The XENON1T collaboration reported an excess of the low-energy electron recoil events between 1 and 7 keV. We propose to explain such an anomaly by the MeV-scale dark matter (DM) heated by the interior of the Sun due to the same DM-electron interaction as in the detector. The kinetic energies of heated DM particles can reach a few keV, and naturally account for the excess signals detected by XENON1T. The inferred DM-electron scattering cross-section is about 0.1~pb, which is consistent with current observations. This model does not rely on any special assumptions on DM models, which serves as a general explanation of the XENON1T anomaly via DM-electron interaction. The spectrum of the Sun-heated DM is typically soft comparing to other boosted DM, so the small recoil events are expected to be abundant in this scenario. Future direct detection experiments with lower thresholds can distinguish this scenario with other boosted DM models or solar axion models.