Heat shock protein 27 (HSP27) is a molecular chaperone adapting to stresses and sustaining physiological functions. Neuronal or ubiquitous overexpression of HSP27 which is located in nucleus can enhance stress resistance and extend lifespan in Drosophila. However, whether the nuclear localization of HSP27 is required for enhanced stress response and longevity remains unknown. Here we report that nuclear localization of HSP27 plays an important role in starvation response and longevity upon overexpression in Drosophila. Site-directed mutagenesis of three arginine residues responsible for HSP27 nuclear localization to glycines excludes mutant HSP27 in nucleus and instead accumulates in cytoplasm. While overexpressing wild-type HSP27 confers starvation resistance, overexpression of the mutant HSP27 fails to retain the enhanced starvation tolerance in the transgenic flies. Overexpressing the mutant HSP27 in neurons or ubiquitously loses the ability to extend lifespan in Drosophila. Together, the results shed a light on the importance of nuclear localization of HSP27 in modulating starvation response and longevity in Drosophila. The further identification of nuclear HSP27 interacting proteins accountable for starvation adaptation and longevity will be next to pursue.