Physiological responses to changes in environmental conditions such as temperature may partly arise from the resident microbial community that integrates a wide range of bio-physiological aspects of the host. In the present study, we assessed the effect of developmental temperature on the thermal tolerance and microbial community of <i>Drosophila melanogaster</i>. We also developed a bacterial transplantation protocol in order to examine the possibility of reshaping the host bacterial composition and assessed its influence on the thermotolerance phenotype. We found that the temperature during development affected thermal tolerance and the microbial composition of male <i>D. melanogaster</i>. Flies that developed at low temperature (13°C) were the most cold resistant and showed the highest abundance of <i>Wolbachia</i>, while flies that developed at high temperature (31°C) were the most heat tolerant and had the highest abundance of <i>Acetobacter</i>. In addition, feeding newly eclosed flies with bacterial suspensions from intestines of flies developed at low temperatures changed the heat tolerance of recipient flies. However, we were not able to link this directly to a change in the host bacterial composition.