Rising temperatures and frequent heatwaves pose a major threat to ectotherms due to their reliance on environmental temperature for physiological processes. Thermal tolerance, the ability to withstand varying temperature, determines how effectively and efficiently individuals can survive under extreme conditions. Host–microbial symbiotic interactions can influence thermal tolerance in insects; however, we have limited information especially for some endosymbionts such as gregarines, a group of apicomplexan endoparasites, which are commonly found in the guts of many aquatic and terrestrial insects. Gregarines are often considered parasitic, while a few recent studies have shown beneficial effects on hosts. Here, we tested the impact of gregarines on thermal tolerance in Ischnura heterosticta damselflies. We found that damselflies naturally infected with gregarines had higher thermal tolerance than damselflies without gregarine infections. Our findings provide evidence in support of gregarines as an endosymbiont of I. heterosticta damselfly. Our study indicates that gregarine endosymbionts may assist damselfly and possibly other semi-aquatic insects to sustain extreme heat and highlights the importance of understanding host–symbiont interactions in the context of climate change and species conservation.