BackgroundAppropriate vertical movement is critical for the survival of flying animals. Although negative geotaxis (moving away from Earth) driven by gravity has been extensively studied, much less is understood concerning a static regulatory mechanism for inducing positive geotaxis (moving toward Earth).ResultsUsing Drosophila melanogaster as a model organism, we showed that geomagnetic field (GMF) induces positive geotaxis and antagonizes negative gravitaxis. Remarkably, GMF acts as a sensory cue for an appetite-driven associative learning behavior through the GMF-induced positive geotaxis. This GMF-induced positive geotaxis requires the three geotaxis genes, such as cry, pyx and pdf, and the corresponding neurons residing in Johnston’s organ of the fly’s antennae.ConclusionsThese findings provide a novel concept with the neurogenetic basis on the regulation of vertical movement by GMF in the flying animals.Electronic supplementary materialThe online version of this article (doi:10.1186/s13041-016-0235-1) contains supplementary material, which is available to authorized users.