Endophytes can assist crops in adapting to high temperatures and drought conditions, thereby reducing agricultural losses. However, the mechanism through which endophytes regulate crop resistance to high temperatures and drought stress remains unclear, and concerns regarding safety and stability exist with active endophytes. Thus, heat-treated endophytic bacteria LSE01 (HTB) were employed as a novel microbial fertilizer to investigate their effects on plant adaptation to high temperatures and drought conditions. The results indicated that the diameter and weight of tomatoes treated with HTB under stress conditions increased by 23.04% and 71.15%, respectively, compared to the control. Tomato yield did not significantly decrease compared to non-stress conditions. Additionally, the contents of vitamin C, soluble sugars, and proteins treated with HTB increased by 18.81%, 11.54%, and 99.75%, respectively. Mechanistic research revealed that HTB treatment enhances tomato's stress resistance by elevating photosynthetic pigment and proline contents, enhancing antioxidant enzyme activities, and reducing the accumulation of MDA. Molecular biology research demonstrates that HTB treatment upregulates the expression of drought-resistant genes (GA2ox7, USP1, SlNAC3, SlNAC4), leading to modifications in stomatal conductance, plant morphology, photosynthetic intensity, and antioxidant enzyme synthesis to facilitate adaptation to dry conditions. Furthermore, the upregulation of the heat-resistant gene (SlCathB2-2) can increases the thickness of tomato cell walls, rendering them less vulnerable to heat stress. In summary, HTB endows tomatoes with the ability to adapt to high temperatures and drought conditions, providing new opportunities for sustainable agriculture.