We investigated in this study the influence of an endophytic fungus, Paecilomyces formosus LHL10, on the thermotolerance of cucumber (Cucumis sativus) upon exposure to high (38°C) and low (8°C) temperature stresses. The results showed that endophyte-inoculated plants had significantly higher plant growth attributes under high-temperature stress. However, they were either low or insignificant in non-inoculated control and inoculated plants with 8°C treatments. Lower stress-promulgated water deficit and cellular membrane damage were observed in endophyte-treated plants after 38°C treatment than in control plants under 8°C stress. Total polyphenol, reduced glutathione, and lipid peroxidation activities were reduced in endophyte-associated plants after exposure to 38°C as compared with control and 8°C-treated plants. The concentration of saturated fatty acids (palmitic-C16:0; stearic-C18:0) was lower in endophyte-treated plants with or without low-temperature stress, but after 8°C treatment increased compared with controls. Unsaturated fatty acids (oleic-C18:1; linoleic-C18:2; linolenic-C18:3 acids) were similar at normal conditions; however, at 38°C, C18:2 and C18:3 were decreased, and C18:1 was increased in endophyte-treated plants compared with controls, while the inverse relationship was found at 8°C. Low levels of abscisic acid in P. formosus-associated plants after 38°C treatments revealed stress tolerance compared with control and 8°C-treated plants. In contrast, salicylic acid was pronounced in endophyte-treated plants after low-temperature stress as compared to other treatments. The results provide evidence that the response to P. formosus association was beneficial at normal growth temperature and had varying effects in response to temperature stress.