The recently reported excess in XENON1T is explained by two scenarios with and without a dark matter interaction with the gauged lepton number, \(U(1)_{L_e-L_i}\), \(i=\mu\) or \(\tau\). In Scenario#1, the gauge boson provides non-standard interaction between solar neutrino and electron that enhances the number of electron recoil events in the XENON1T detector. In Scenario#2 with the gauge coupling to dark matter, dark matter can be boosted by cosmic electrons and generate electron recoil energy up to \(\mathcal{O}({\rm keV})\) to explain the XENON1T result. The dark matter, aided by the new gauge interaction, could heat up a neutron star more than 1500 K as a neutron star captures the halo dark matter. Therefore, we propose to utilize the future infrared telescope to test our scenario.