Usually, high temperature decreases the output performance of triboelectric nanogenerator (TENG) because of the dissipation of triboelectric charges through the thermionic emission. It would be highly valuable if the high temperature can be used to enhance the output performance of TENG. In this paper, through a simulation combining the electron-cloud-potential-well model for triboelectrification and the thermionic-emission model, we find that there exists an optimum temperature difference ∆T between friction layers under which the output of TENG is maximum. Based on this, a type of contact-separation temperature difference TENG with controllable friction layer temperature (TDNG) is designed and fabricated to enhance the electrical output performance in temperature difference environment. As the temperature difference ∆T increasing from 0 K to 145 K, the output voltage, current, the surface charge density and output power are increased 2.7, 2.2, 3.0 and 2.9 times, respectively (from 315 V, 9.1 μA, 47 nC/m2, 69 μW to 858 V, 20 μA, 0.14 μC/m2, 206.7 μW). Then with the continuous increase of ∆T to 219 K, the surface charge density and output performance gradually decrease. At the optimal temperature difference (145 K), the biggest output current density (396 μA/cm2) has been obtained, which is 13% larger than the reported record value (350 μA/cm2).