During Drosophila aversive olfactory conditioning, aversive shock information needs to be transmitted to the mushroom bodies (MBs) to associate with odor information. We report that aversive information is transmitted by ensheathing glia (EG) that surround the MBs. Shock induces vesicular exocytosis of glutamate from EG. Blocking exocytosis impairs aversive learning, whereas activation of EG can replace aversive stimuli during conditioning. Glutamate released from EG binds to N-methyl-d-aspartate receptors in the MBs, but because of Mg2+ block, Ca2+ influx occurs only when flies are simultaneously exposed to an odor. Vesicular exocytosis from EG also induces shock-associated dopamine release, which plays a role in preventing formation of inappropriate associations. These results demonstrate that vesicular glutamate released from EG transmits negative valence information required for associative learning.