Extrafloral nectar (EFN) is a plant secretion known to mediate interactions between insects and plants. Here we present the ecological characterization of the EFN of Cedrela odorata, in terms of sugar composition, as well as its importance in attracting ant visitors to extrafloral nectaries. We also studied the influence of different plant water conditions on the quality of EFN. We found site (forest, agroecosystem, plantation) and season (i.e., rainy, dry) effects for both water balance and the quality of EFN. Our results show that (i) water has a significant influence on EFN quality and (ii) environmental disturbance that differed at each site was associated with differences in loss of water through transpiration. Season also affected the levels of dissolved sugars in EFN. This had a direct, site-dependent impact on the abundance of ants foraging on EFN. Only at the most disturbed site (where higher damage by shoot borer occurred) was the abundance of ants foraging on EFN higher during the rainy season, when herbivore pressure increased. This pattern was consistent with an induced biotic defense strategy in C. odorata.