The heat shock (HS) response is essential for survival of all organisms. Although the machinery of the HS response has been extensively investigated at the cellular level, it is poorly understood at the level of the organism. Here, we show the crucial role of the mushroom body (MB) in the HS response in Drosophila. Null mutants of the mitochondrial phosphatase Drosophila PGAM5 (dPGAM5) exhibited increased vulnerability to HS, which was reversed by MB-specific expression of the caspase inhibitor p35, and similar vulnerability was induced in wild-type flies by knockdown of MB dPGAM5. Elimination of the MB did not affect the HS response of wild-type flies, but did increase the resistance of dPGAM5-deficient flies to HS. Thus, the MB may possess an apoptosis-dependent toxic function, the suppression of which by dPGAM5 appears to be crucial for HS resistance.